[19.03 backport] overlay[2]: rm extra checks in init #40462
Merged
AkihiroSuda merged 4 commits intomoby:19.03from Feb 18, 2020
Merged
[19.03 backport] overlay[2]: rm extra checks in init #40462AkihiroSuda merged 4 commits intomoby:19.03from
AkihiroSuda merged 4 commits intomoby:19.03from
Conversation
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> (cherry picked from commit 074eca1) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This moves supportsMultipleLowerDir() to overlayutils so it can be used from both overlay and overlay2. The only changes made were: * replace logger with logrus * don't use workDirName mergedDirName constants * add mnt var to improve readability a bit This is a preparation for the next commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit d568707) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Before this commit, overlay check was performed by looking for `overlay` in /proc/filesystem. This obviously might not work for rootless Docker (fs is there, but one can't use it as non-root). This commit changes the check to perform the actual mount, by reusing the code previously written to check for multiple lower dirs support. The old check is removed from both drivers, as well as the additional check for the multiple lower dirs support in overlay2 since it's now a part of the main check. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 649e4c8) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Now that we do check if overlay is working by performing an actual overlayfs mount, there's no need in extra checks for the kernel version or the filesystem type. Actual mount check is sufficient. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit e226aea) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
thaJeztah
approved these changes
Feb 6, 2020
Member
thaJeztah
left a comment
There was a problem hiding this comment.
SGTM
I think 19.03.6 is almost done, so perhaps this should wait for 19.03.7
This was referenced Oct 10, 2022
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.
cherrypick #38930 #40210