-
Notifications
You must be signed in to change notification settings - Fork 32
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
Incorrect /opt mount permission on 2605.8.0 on AWS #279
Comments
Could this problem be why #278 exists? |
Interesting, this folder is not created by Flatcar because it doesn't exist by default nor has a systemd-tmpfile directive to be created. In #176 you can see some ways how to find the process that does the modification. Can you try to find it out? |
I created a new EC2 instance with the referenced AMI with no userdata at all. @pothos to your point it looks like
I suspect it's being triggered by the initial dockerd or containerd startup, but it's certainly related to the flatcar base configuration. What's not too clear is what has changed in the last couple releases. Was there an existing /opt directory with appropriate permissions before? Are dockerd's default directory creation permissions different for some reason? |
Shutting down dockerd and containerd then starting them up individually, I was able to isolate the containerd startup as the action causing /opt to be created. This is approximately discussed here. Workarounds aside, what's the best way to get back to having sane permissions on /opt by default? Does containerd need to be more thoughtful? Or do we need to have the directory back in the base image so we don't leave permissions up to whatever gets there first? |
Thanks for tracking it down. I think containerd shouldn't create
It will also adjust existing wrong permissions. |
The well-known path /opt/bin is used in PATH as place for extra binaries and /opt in general is a place for additional software. Containerd creates /opt on runtime if it is not present but uses restrictive permissions, causing non-root programs to fail accessing, e.g., /opt/bin. Add tmpfile directives for /opt and /opt/bin to ensure that they have the correct permissions. Fixes flatcar/Flatcar#279
The fix will be part of the next releases in all channels, e.g., > 2605.8.0 for Stable. |
Description
We updated our AWS EC2 Kubernetes worker nodes to the latest AMI version, ami-006c88b6ca69f7811, which is version 2605.8.0. Our weave CNI plugin was not loading. When looking at the permissions of /opt we found it to be 711. Our weave plugin is expecting to reside in /opt/cni/bin
drwx--x--x. 3 root root 4096 Nov 19 21:18 opt
We reverted back to 2512.2.1 and opt is 755
drwxr-xr-x. 4 root root 4096 Nov 19 22:05 /opt
Impact
Kubernetes pods fail to launch due to weave not coming up
Environment and steps to reproduce
AWS: us-east-1
AMI: ami-006c88b6ca69f7811
Spin up EC2 instance on AMI ami-006c88b6ca69f7811
Spin up EC2 instance on AMI ami-006c88b6ca69f7811
/opt has incorrect permissions of 711
Expected behavior
/opt permissions should be 755
Additional information
N/A
The text was updated successfully, but these errors were encountered: