Description of problem: When starting kube-proxy and kubelet on Kubernetes node, AVC denial gets logged. Version-Release number of selected component (if applicable): kubernetes-node-1.9.1-5.fc27.x86_64 selinux-policy-3.13.1-283.17.fc27.noarch iptables-1.6.1-4.fc27.x86_64 docker-1.13.1-44.git584d391.fc27.x86_64 container-selinux-2.48-1.fc27.noarch How reproducible: Deterministic. Steps to Reproduce: 1. dnf install -y kubernetes-node 2. systemctl restart kube-proxy kubelet 3. Check audit.log / journal. Actual results: type=AVC msg=audit(1519835116.383:147): avc: denied { read } for pid=11978 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1519835116.386:148): avc: denied { read } for pid=11980 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1519835116.387:149): avc: denied { read } for pid=11981 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1519835116.388:150): avc: denied { read } for pid=11982 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1519835116.389:151): avc: denied { read } for pid=11983 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1519835116.390:152): avc: denied { read } for pid=11984 comm="iptables" name="xtables.lock" dev="tmpfs" ino=36434 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0 Expected results: No AVC denials logged. Additional info: This is very similar to bug 1391039. The file /var/run/xtables.lock looks mislabelled. # restorecon -nv /var/run/xtables.lock Would relabel /run/xtables.lock from system_u:object_r:var_run_t:s0 to system_u:object_r:iptables_var_run_t:s0
The same bug is also present on Fedora 26 with kubernetes-node-1.7.3-1.fc26.x86_64 selinux-policy-3.13.1-260.18.fc26.noarch iptables-1.6.1-2.fc26.x86_64 docker-1.13.1-44.git584d391.fc26.x86_64 container-selinux-2.40-1.fc26.noarch
Starting only the kubelet or only the kube-proxy does not seem to trigger the error.
The issue is still present on Fedora 27 with latest Kubernetes: kubernetes-node-1.10.1-0.fc27.x86_64 selinux-policy-3.13.1-283.34.fc27.noarch iptables-1.6.2-3.fc27.x86_64 docker-1.13.1-51.git4032bd5.fc27.x86_64 container-selinux-2.55-1.fc27.noarch
Selinux related issues were always handled by the docker team. If not, please reassign back or to the proper component. Thanks.
The thing is, merely starting docker on fresh Fedora 27 install works. It's when Kubernetes get added to the mix and they create that mislabeled /run/xtables.lock file, then things start to fail.
A workaround is to run touch /run/xtables.lock before installing (starting?) Kubernetes.
With the recent packages kubernetes-node-1.10.1-0.fc27.x86_64 selinux-policy-3.13.1-283.34.fc27.noarch iptables-1.6.2-3.fc27.x86_64 docker-1.13.1-59.gitaf6b32b.fc27.x86_64 container-selinux-2.65-1.gitbf5b26b.fc27.noarch on Fedora 27, the systemctl restart kube-proxy kubelet not just produces AVC denial but kubelet.service fails to start altogether.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.