Skip to content

[19.03 backport] overlay[2]: rm extra checks in init #40462

Merged
AkihiroSuda merged 4 commits into
moby:19.03from
AkihiroSuda:cherrypick-40210-1903
Feb 18, 2020
Merged

[19.03 backport] overlay[2]: rm extra checks in init #40462
AkihiroSuda merged 4 commits into
moby:19.03from
AkihiroSuda:cherrypick-40210-1903

Conversation

@AkihiroSuda

Copy link
Copy Markdown
Member

cherrypick #38930 #40210

Danny Milosavljevic and others added 4 commits February 6, 2020 13:18
Signed-off-by: Danny Milosavljevic <[email protected]>
(cherry picked from commit 074eca1)
Signed-off-by: Akihiro Suda <[email protected]>
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 <[email protected]>
(cherry picked from commit d568707)
Signed-off-by: Akihiro Suda <[email protected]>
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 <[email protected]>
(cherry picked from commit 649e4c8)
Signed-off-by: Akihiro Suda <[email protected]>
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 <[email protected]>
(cherry picked from commit e226aea)
Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
AkihiroSuda requested a review from dmcgowan as a code owner February 6, 2020 04:20
@thaJeztah thaJeztah added the area/rootless Rootless Mode label Feb 6, 2020
@thaJeztah thaJeztah added this to the 19.03.7 milestone Feb 6, 2020

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

I think 19.03.6 is almost done, so perhaps this should wait for 19.03.7

@arkodg @tonistiigi @tiborvass ?

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

4 participants