Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay: support native rootless mounts #816

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Feb 9, 2021

tested on Fedora Rawhide with kernel
5.11.0-0.rc6.20210204git61556703b610.144.fc34.x86_64

There is currently an issue when context= is specified and the mount
fails with EACCES. We can drop it once it works in the kernel.

Signed-off-by: Giuseppe Scrivano [email protected]

@giuseppe giuseppe requested a review from rhatdan February 9, 2021 12:31
@giuseppe
Copy link
Member Author

giuseppe commented Feb 9, 2021

I am already in touch with Vivek and Miklos about the kernel issue

@giuseppe giuseppe force-pushed the native-overlay-rootless branch from 0413643 to 7c28a83 Compare February 9, 2021 12:33
@rhatdan
Copy link
Member

rhatdan commented Feb 9, 2021

What happens if the kernel does not support overlay, do we still fall back to using fuse-overlayfs if it is installed?

Copy link
Member

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

LGTM

tested on Fedora Rawhide with kernel
5.11.0-0.rc6.20210204git61556703b610.144.fc34.x86_64

There is currently an issue when context= is specified and the mount
fails with EACCES.  It is being addressed in the kernel upstream.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the native-overlay-rootless branch from 7c28a83 to 6cb8896 Compare February 10, 2021 07:53
@giuseppe
Copy link
Member Author

giuseppe commented Feb 10, 2021

What happens if the kernel does not support overlay, do we still fall back to using fuse-overlayfs if it is installed?

we don't have that check in place here, we do it in containers/common.

I've dropped the workaround for the mount label since there is a patch for the kernel upstream

@rhatdan
Copy link
Member

rhatdan commented Feb 10, 2021

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1023,6 +1024,11 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
} else if d.options.mountOptions != "" {
opts = fmt.Sprintf("%s,%s", d.options.mountOptions, opts)
}

if d.options.mountProgram == "" && unshare.IsRootless() {
opts = fmt.Sprintf("%s,userxattr", opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be set only on kernel >= 5.11?

Ubuntu and Debian have been supporting rootless overlayfs and do not want userxattr opt here (for kernel < 5.11).

Copy link
Member Author

Choose a reason for hiding this comment

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

we don't support the Ubuntu and Debian custom patch for rootless overlay. The main reason is that on old kernels it is not allowed to create whiteout files without an overlay mount and that would complicate how image pulls are performed

Copy link
Member

Choose a reason for hiding this comment

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

We also don't want kernel version checks, since these features can/will be back ported to RHEL8 and Centos Stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants