Bug 1414963
Summary: | SetupNetworkError "Failed to setup network for pod" after 3.4 Upgrade | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Nick Schuetz <nschuetz> |
Component: | Networking | Assignee: | Ben Bennett <bbennett> |
Status: | CLOSED NOTABUG | QA Contact: | Meng Bo <bmeng> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.4.0 | CC: | aos-bugs, dwalsh, jbaird, jokerman, mmccomas, nschuetz, stwalter |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-24 19:27:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nick Schuetz
2017-01-19 20:17:17 UTC
If you remove /etc/systemd/system/docker.service.d/docker-sdn-ovs.conf and restart docker does the problem go away? That file does not exist. I went to remove it as a part of the upgrade process and it wasn't there then either. # stat /etc/systemd/system/docker.service.d/docker-sdn-ovs.conf stat: cannot stat ‘/etc/systemd/system/docker.service.d/docker-sdn-ovs.conf’: No such file or directory The following directory does not exist either: /etc/systemd/system/docker.service.d # grep ovs /etc/origin/master/master-config.yaml networkPluginName: redhat/openshift-ovs-subnet This seems to be selinux related. I turned off selinux (setenforce 0) and all my pods were able to SetupNetwork and start. And the error went away. Can you get the selinux audit entries please? This may be the culprit: type=SYSCALL msg=audit(1484866535.244:2144): arch=c000003e syscall=59 success=no exit=-13 a0=c42010ca3a a1=c42010ca40 a2=c4200bc1e0 a3=0 items=0 ppid=32195 pid=32211 auid=4294967295 uid=1001 gid=0 euid=1001 suid=1001 fsuid=1001 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="exe" exe="/usr/libexec/docker/docker-runc-current" subj=system_u:system_r:unconfined_service_t:s0 key=(null) # ls -lZ /usr/libexec/docker/* -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/libexec/docker/docker-proxy-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/libexec/docker/docker-runc-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/libexec/docker/rhel-push-plugin # ls -lZ /usr/bin/docker* -rwxr-xr-x. root root system_u:object_r:docker_exec_t:s0 /usr/bin/docker -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-containerd -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-containerd-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-containerd-shim -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-containerd-shim-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-ctr-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/dockerd-current -rwxr-xr-x. root root system_u:object_r:bin_t:s0 /usr/bin/docker-storage-setup FYI While doing the package updates I got: Updating : selinux-policy-targeted-3.13.1-102.el7_3.13.noarch 36/97 Re-declaration of type docker_t Failed to create node Bad type declaration at /etc/selinux/targeted/tmp/modules/100/docker/cil:1 /usr/sbin/semodule: Failed! # chcon -t container_runtime_exec_t /usr/bin/docker* chcon: failed to change context of ‘/usr/bin/docker’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-containerd’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-containerd-current’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-containerd-shim’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-containerd-shim-current’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-ctr-current’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-current’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/dockerd-current’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument chcon: failed to change context of ‘/usr/bin/docker-storage-setup’ to ‘system_u:object_r:container_runtime_exec_t:s0’: Invalid argument Am i doing something wrong here? Nothing is returned from the following command: semanage fcontext -l | grep container_runtime_exec_t Add Dan Walsh to see the selinux problem Forcing a reinstall container-selinux package fixed the issue and labeled the docker components appropriately: # ls -lZ /usr/bin/docker* -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-containerd -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-containerd-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-containerd-shim -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-containerd-shim-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-ctr-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/dockerd-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/bin/docker-storage-setup # ls -laZ /usr/libexec/docker/* -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/libexec/docker/docker-proxy-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/libexec/docker/docker-runc-current -rwxr-xr-x. root root system_u:object_r:container_runtime_exec_t:s0 /usr/libexec/docker/rhel-push-plugin I just hit the same bug after upgrading from OCP 3.3 to OCP 3.4 and performing a 'yum update' to the latest RHEL 7.3.z: Updating : selinux-policy-targeted-3.13.1-102.el7_3.13.noarch 36/97 Re-declaration of type docker_t Failed to create node Bad type declaration at /etc/selinux/targeted/tmp/modules/100/docker/cil:1 /usr/sbin/semodule: Failed! To fix the issue I had to perform a 'yum reinstall container-selinux' on each node and then restart/relabel. It would appear that this is actually a problem for multiple users. Why is this happening? You should open a bug against docker / selinux... that's not really a networking problem. (In reply to Ben Bennett from comment #19) > You should open a bug against docker / selinux... that's not really a > networking problem. Does this bug apply: https://bugzilla.redhat.com/show_bug.cgi?id=1413536 Steve - yes, it would appear to be the same problem. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |