overlay[2]: rm extra checks in init#40210
Merged
AkihiroSuda merged 3 commits intomoby:masterfrom Nov 15, 2019
Merged
Conversation
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>
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>
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>
Contributor
Author
|
@snajpa would you help in testing this on some previously unsupported configurations (e.g. zfs)? |
|
@kolyshkin absolutely, but please give me a few days (I think I should get to this by ~monday-tuesday next week). |
Contributor
|
LGTM |
AkihiroSuda
approved these changes
Nov 15, 2019
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.
This builds on top of (and currently includes) #40194
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.
Reported-by: @snajpa