This repository was archived by the owner on Sep 24, 2020. It is now read-only.
graphdriver: fail earlier on existing driver#44
Merged
euank merged 1 commit intocoreos:coreos-1.12.6from Oct 19, 2017
Merged
Conversation
Author
|
Manual testing done:
|
Prior to this change it was possible to end up with a running dockerd which, when restarted, would fail due to multiple graphdrivers. The obvious example of how to get into this state is the following: 1) start dockerd with `-s overlay2` This creates `/var/lib/docker/overlay2` 2) start dockerd with no `-s` flag This detects overlay2 and thinks it's okay since there's only one, but then since overlay2 is not in the priority list, it ends up going with overlay. Now `overlay2` and `overlay` exist. 3) restart dockerd with no changes It now detects both overlay2 and overlay and falls over This change is intended to make case 2 impossibe. If a restart of dockerd with no flag changes will reliably fail next time, it should fail now too. Implementation wise, this just checks that the driver that will be used matches the existing one.
bgilbert
approved these changes
Oct 19, 2017
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.
Prior to this change it was possible to end up with a running dockerd
which, when restarted, would fail due to multiple graphdrivers.
The obvious example of how to get into this state is the following:
-s overlay2This creates
/var/lib/docker/overlay2-sflagThis detects overlay2 and thinks it's okay since there's only one,
but then since overlay2 is not in the priority list, it ends up going
with overlay. Now
overlay2andoverlayexist.It now detects both overlay2 and overlay and falls over
This change is intended to make case 2 impossibe. If a restart of
dockerd with no flag changes will reliably fail next time, it should
fail now too.
Implementation wise, this just checks that the driver that will be used
matches the existing one.