Fix overlay2 busy error on mount#39780
Merged
yongtang merged 1 commit intomoby:masterfrom Aug 24, 2019
Merged
Conversation
When mounting overlays which have children, enforce that the mount is always performed as read only. Newer versions of the kernel return a device busy error when a lower directory is in use as an upper directory in another overlay mount. Adds committed file to indicate when an overlay is being used as a parent, ensuring it will no longer be mounted with an upper directory. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
tonistiigi
approved these changes
Aug 21, 2019
SamWhited
reviewed
Aug 22, 2019
| opts = indexOff + "lowerdir=" + diffDir + ":" + strings.Join(absLowers, ":") | ||
| } else { | ||
| opts = indexOff + "lowerdir=" + strings.Join(absLowers, ":") + ",upperdir=" + diffDir + ",workdir=" + workDir | ||
| } |
Contributor
There was a problem hiding this comment.
nit: I generally prefer something like this to remove the repetition.
opts := indexOff + "lowerdir=" + diffDir + ":" + strings.Join(absLowers, ":")
if !readonly {
opts += ",upperdir=" + diffDir + ",workdir=" + workDir
}
Member
There was a problem hiding this comment.
diffDir is only in lower for the readonly case
Contributor
There was a problem hiding this comment.
Ah right, i missed diffDir.
This was referenced Aug 26, 2019
3 tasks
ianvernon
pushed a commit
to cilium/packer-ci-build
that referenced
this pull request
Oct 18, 2019
This has been fixed upstream by Docker ( moby/moby#39780 ). Signed-off by: Ian Vernon <ian@cilium.io>
ianvernon
pushed a commit
to cilium/packer-ci-build
that referenced
this pull request
Oct 21, 2019
This has been fixed upstream by Docker ( moby/moby#39780 ). Signed-off by: Ian Vernon <ian@cilium.io>
ianvernon
pushed a commit
to cilium/packer-ci-build
that referenced
this pull request
Oct 21, 2019
This has been fixed upstream by Docker ( moby/moby#39780 ). Signed-off by: Ian Vernon <ian@cilium.io>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When mounting overlays which have children, enforce that
the mount is always performed as read only. Newer versions
of the kernel return a device busy error when a lower directory
is in use as an upper directory in another overlay mount.
Adds committed file to indicate when an overlay is being used
as a parent, ensuring it will no longer be mounted with an
upper directory.
Related to kernel@146d62e5a586
Description for the changelog
Overlay2: fix busy error on mount when using newer (>= 5.2) kernels