This repository was archived by the owner on Oct 13, 2023. It is now read-only.
[17.12] daemon.cleanupContainer: nullify container RWLayer upon release#424
Closed
thaJeztah wants to merge 2 commits intodocker-archive:17.12from
Closed
[17.12] daemon.cleanupContainer: nullify container RWLayer upon release#424thaJeztah wants to merge 2 commits intodocker-archive:17.12from
thaJeztah wants to merge 2 commits intodocker-archive:17.12from
Conversation
ReleaseRWLayer can and should only be called once (unless it returns an error), but might be called twice in case of a failure from `system.EnsureRemoveAll(container.Root)`. This results in the following error: > Error response from daemon: driver "XXX" failed to remove root filesystem for YYY: layer not retained The obvious fix is to set container.RWLayer to nil as soon as ReleaseRWLayer() succeeds. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit e9b9e4a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Since commit e9b9e4a has landed, there is a chance that container.RWLayer is nil (due to some half-removed container). Let's check the pointer before use to avoid any potential nil pointer dereferences, resulting in a daemon crash. Note that even without the abovementioned commit, it's better to perform an extra check (even it's totally redundant) rather than to have a possibility of a daemon crash. In other words, better be safe than sorry. [v2: add a test case for daemon.getInspectData] [v3: add a check for container.Dead and a special error for the case] Fixes: e9b9e4a Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 195893d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
need to have a look at this |
Contributor
|
From the first glance, type systemError struct {
cause error
} |
Contributor
|
Closed in favour of #433 |
docker-jenkins
pushed a commit
that referenced
this pull request
Jan 17, 2020
…network_id [19.03 backport] daemon: Use short libnetwork ID in exec-root & update libnetwork Upstream-commit: 9077436e6e9c4b4a7050d2412b370ff49d6e161b Component: engine
docker-jenkins
pushed a commit
that referenced
this pull request
Jan 22, 2020
[19.03] Jenkinsfile: fix image-based engine using wrong branch Upstream-commit: dd6130cdc679c9c7cd5e63e3877fe3c545693ece Component: packaging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
back port of moby/moby#36160 and moby/moby#36242 for 17.12
Conflict in second commit due to moby/moby@87a1242 (moby/moby#35638) not being included in 17.12;
ping @kolyshkin PTAL