-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
containerd 1.4.4 errors out with "Selinux is not supported" due to missing build tags #775
Comments
Turns out that if I build containerd 1.4.4 tag from https://github.com/containerd/containerd/tree/v1.4.4, the I couldn't find the amazon source pkg/rpm for containerd-1.4.4, so I'm not sure how EKS builds containerd from source. |
Evidence that the containerd binary baked with the AMI does not include the expected
|
I looked more into why selinux is not added as a BUILDTAG, even when it's set in the Makefile It's because of how BUILDTAGS is being processed in the Makefile.
Now what does "?=" in a
This means, when containerd is built with BUILDTAGS, the GO_BUILDTAGS for "apparmor" and "selinux" are not added. |
Dumping out tags in the Makefile, shows that the "selinux" tag is INDEED not added.
Now, I made a change to remove the conditional assignment. The selinux and apparmor tags are added!
|
The issue reveals only when you build by explicitly adding Maybe that's how the containerd 1.4.4 package is also built ? |
Verified that a yum install of containerd version 1.4.6-5 available via |
Hi, |
What happened:
Created a cluster with containerd as CRI.
Enabled selinux with
enable_selinux = true
(in /etc/containerd/config.toml)SELinux does not work.
containerd version baked in the AMI is
1.4.4
However, containerd spits out a warning in /var/log/messages like so:
Further more, verified that the process and filesystem labels expected on Pods (an example nginx deployment) is not set:
What you expected to happen:
containerd supports Selinux without warnings/errors
Anything else we need to know?:
It's possible that the Amazon Linux version of containerd does not build with Golang BUILD_TAGS set to
selinux
. This is essential to get SELinux support. Else, only stubbed out Go methods are built as part of containerd, which results in the "Selinux is not supported" error.I built containerd 1.4.4 from source and this version works fine. Simply issuing
make
on https://github.com/containerd/containerd/tree/v1.4.4 should be good.Deploying an nginx Daemonset on the node with the containerd fix shows the tests work as expected.
The process labels show up as expected. This is the process listing on the node.
The file labels show up as expected. This is from inside the container.
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion
): "eks.6"aws eks describe-cluster --name <name> --query cluster.version
): "1.19"uname -a
): 5.4.141-67.229.amzn2.x86_64 SMP Mon Aug 16 12:51:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxcat /etc/eks/release
on a node):The text was updated successfully, but these errors were encountered: