Skip to content

overlay[2]: rm extra checks in init#40210

Merged
AkihiroSuda merged 3 commits intomoby:masterfrom
kolyshkin:ovr-rm-checks
Nov 15, 2019
Merged

overlay[2]: rm extra checks in init#40210
AkihiroSuda merged 3 commits intomoby:masterfrom
kolyshkin:ovr-rm-checks

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Nov 14, 2019

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

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>
@kolyshkin
Copy link
Copy Markdown
Contributor Author

@snajpa would you help in testing this on some previously unsupported configurations (e.g. zfs)?

@snajpa
Copy link
Copy Markdown

snajpa commented Nov 14, 2019

@kolyshkin absolutely, but please give me a few days (I think I should get to this by ~monday-tuesday next week).

@crosbymichael
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants