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

rootless: support Bottlerocket OS #3697

Merged
merged 2 commits into from
Mar 11, 2023
Merged

Conversation

AkihiroSuda
Copy link
Member

Fix #3098

Tested on Bottlerocket OS 1.12.0 (aws-k8s-1.25), kernel 5.15.79 (eksctl --version=1.25 -node-ami-family=Bottlerocket using eksctl 0.132.0)

Port https://github.com/moby/moby/blob/v23.0.1/daemon/oci_linux.go#L430-L460

> // Get the set of mount flags that are set on the mount that contains the given
> // path and are locked by CL_UNPRIVILEGED. This is necessary to ensure that
> // bind-mounting "with options" will not fail with user namespaces, due to
> // kernel restrictions that require user namespace mounts to preserve
> // CL_UNPRIVILEGED locked flags.

Fix issue 3098

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
…ces=N`)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@@ -24,6 +24,12 @@ spec:

See also the [example manifests](#Kubernetes).

### Bottlerocket OS

Needs to run `sysctl -w user.max_user_namespaces=N` (N=positive integer, like 63359) on the host nodes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Running this command in the Bottlerocket hosts isn't the recommended approach, I can update the docs to mention how to set up max_user_namespaces in the “Bottlerocket way”, if that's OK with you all.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, please

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.

rootless: support Bottlerocket OS (probably by porting moby/daemon.getUnprivilegedMountFlags())
4 participants