summaryrefslogtreecommitdiff
path: root/layer/migration.go
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #43302 from thaJeztah/layer_remove_getwithoutlockSebastiaan van Stijn2022-03-051-1/+3
|\ | | | | layers: remove layerStore.getWithoutLock()
| * layers: remove layerStore.getWithoutLock()Sebastiaan van Stijn2022-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function was abstracting things a bit too much; the layerStore had a exported `.Get()` which called `.getWithoutLock()`, but also a non-exported `.get()`, which also called `.getWithoutLock()`. While it's common to have a non-exported variant (without locking), the naming of `.get()` could easily be confused for that variant (which it wasn't). All locations where `.get()` was called were already handling locks for `releaseLayer()`, so moving the actual locking inline for `.get()` makes it more visible where locking happens. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* | remove unneeded "digest" alias for "go-digest"Sebastiaan van Stijn2022-03-041-1/+1
|/ | | | | | | | I think this was there for historic reasons (may have been goimports expected this, and we used to have a linter that wanted it), but it's not needed, so let's remove it (to make my IDE less complaining about unneeded aliases). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Remove "could not get checksum with tar-split" debug messageSebastiaan van Stijn2020-03-061-1/+0
| | | | | | | | | | | | | | | | | This code was originally written for v1.10 migration where it signified that layers were recomputed from pre 1.8 layout and could possibly change the tarball checksums. It's now being repurposed in the BuildKit adapter but there it doesn't have any warn condition as all data generated by builder is new anyway. Currently, debug log entries as the one below may appear in the daemon logs: [2019-10-02T10:00:06.690674253Z] could not get checksum for "x128nsj79yzfx4j5h6em2w2on" with tar-split: "no tar-split file" This patch removes the debug log, as it may confuse users ("we couldn't validate what we downloaded, but we're gonna run it anyway?") Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* goimports: fix importsSebastiaan van Stijn2019-09-181-1/+1
| | | | | | | Format the source according to latest goimports. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* layer/CreateRWLayerByGraphID: removeKir Kolyshkin2019-05-211-59/+0
| | | | | | | | This is an additon to commit 1fea38856a ("Remove v1.10 migrator") aka PR #38265. Since that one, CreateRWLayerByGraphID() is not used anywhere, so let's drop it. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* layer: optimize layerStore mountLXinfeng Liu2019-05-091-3/+3
| | | | | | | | | | | | | | | | | | | | Goroutine stack analisys shown some lock contention while doing massively (100 instances of `docker rm`) parallel image removal, with many goroutines waiting for the mountL mutex. Optimize it. With this commit, the above operation is about 3x faster, with no noticeable change to container creation times (tested on aufs and overlay2). kolyshkin@: - squashed commits - added description - protected CreateRWLayer against name collisions by temporary assiging nil to ls.mounts[name], and treating nil as "non-existent" in all the other functions. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Add canonical import commentDaniel Nephin2018-02-051-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* LCOW: Refactor to multiple layer-stores based on feedbackJohn Howard2018-01-181-17/+5
| | | | Signed-off-by: John Howard <jhoward@microsoft.com>
* LCOW: Re-coalesce storesJohn Howard2018-01-181-5/+17
| | | | | | | | | | Signed-off-by: John Howard <jhoward@microsoft.com> The re-coalesces the daemon stores which were split as part of the original LCOW implementation. This is part of the work discussed in https://github.com/moby/moby/issues/34617, in particular see the document linked to in that issue.
* Golint: remove redundant ifsSebastiaan van Stijn2018-01-151-5/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update logrus to v1.0.1Derek McGowan2017-07-311-1/+1
| | | | | | Fixes case sensitivity issue Signed-off-by: Derek McGowan <derek@mcgstyle.net>
* *: use opencontainers/go-digest packageStephen J Day2017-01-061-2/+2
| | | | | | | | The `digest` data type, used throughout docker for image verification and identity, has been broken out into `opencontainers/go-digest`. This PR updates the dependencies and moves uses over to the new type. Signed-off-by: Stephen J Day <stephen.day@docker.com>
* Merge pull request #20458 from aaronlehmann/migration-close-gzip-writerArnaud Porterie2016-02-181-0/+1
|\ | | | | Close tarsplit gzip writer when creating tar-split.json.gz files during layer migration
| * Close tarsplit gzip writer when creating tar-split.json.gz files during ↵Aaron Lehmann2016-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | layer migration There is a missing call to Close on the gzip.Writer that is used to compress newly created tar-split files during layer migration. This can result in corrupt tar-split files that later cause docker push and docker save to fail. The Close call is necessary to flush buffered data to the stream. Fixes: #20104 Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* | Don’t stop daemon on migration hard failureTonis Tiigi2016-02-171-1/+1
|/ | | | | | | | | | Also changes missing storage layer for container RWLayer to a soft failure. Fixes #20147 Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 2798d7a6a681aee8995e87c9b68128e54876d2b5)
* Parallel migration and optimizationsTonis Tiigi2016-01-041-70/+77
| | | | Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
* Refactor RWLayer to use referenced object instead of stringDerek McGowan2015-12-231-13/+12
| | | | | | | | RWLayer will now have more operations and be protected through a referenced type rather than always looked up by string in the layer store. Separates creation of RWLayer (write capture layer) from mounting of the layer. This allows mount labels to be applied after creation and allowing RWLayer objects to have the same lifespan as a container without performance regressions from requiring mount. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Rearrange layerstore lockingAidan Hobson Sayers2015-11-241-4/+2
| | | | Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
* Add layer storeDerek McGowan2015-11-241-0/+251
Layer store manages read-only and read-write layers on a union file system. Read only layers are always referenced by content addresses. Read-write layer identifiers are handled by the caller but upon registering its difference, the committed read-only layer will be referenced by content hash. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan) Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>