-
Notifications
You must be signed in to change notification settings - Fork 752
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
aws-node container failing to restart with SELinux enabled #2079
Comments
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
/not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
Since the move to a Golang entrypoint, we no longer use the shell This should resolve the SELinux issue in enforcing mode, so closing this as fixed by #2146 |
|
What happened:
aws-node container is having problems restarting after SELinux enforcing mode is applied. This happens because the file '/host/etc/cni/net.d/10-aws.conflist' was created by an older container(first aws-node container on the node) with a different context than the new container initializing. That puts the new container in CrashLoopBackOff.
Here's an example from one of the nodes:
Now when i delete this pod and a new pod(aws-node-rxcq6) comes up, here's the error message from the aws-node container:
Detailed exception:
As you can see the new container(with context c220,c982) is not able to "mv" the file "10-aws.conflist" that was created with different context (c615,c828). This is the line of code where it fails https://github.com/aws/amazon-vpc-cni-k8s/blob/master/scripts/entrypoint.sh#L199
Looks like if we change mv command to cp instead, it should work with selinux. Reference https://danwalsh.livejournal.com/56534.html
Attach logs
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
): v1.21.14-eks-18ef993cat /etc/os-release
):uname -a
): ip-10-134-188-70.vpc.internal 5.4.204-113.362.amzn2.x86_64The text was updated successfully, but these errors were encountered: