Bug 1460341
Summary: | unable to run image built from 'docker.io/httpd'; 'could not open error log file /proc/self/fd/2' | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Micah Abbott <miabbott> | |
Component: | container-selinux | Assignee: | Daniel Walsh <dwalsh> | |
Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.3 | CC: | amurdaca, dwalsh, lsm5, miabbott | |
Target Milestone: | rc | Keywords: | Extras, Regression | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | container-selinux-2.19-1.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1461571 (view as bug list) | Environment: | ||
Last Closed: | 2017-06-28 15:41:12 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1461571 |
Description
Micah Abbott
2017-06-09 18:23:33 UTC
Can you disable selinux and re-try? Yeah, disabling SELinux works around it. Similar problems with a 'httpd' container based on 'docker.io/nginx' Build with this Dockerfile: https://github.com/projectatomic/atomic-host-tests/blob/master/tests/docker-build-httpd/files/nginx_httpd/Dockerfile The logs from that container: # docker logs nginx_httpd nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2017/06/09 19:14:34 [emerg] 1#1: open() "/var/log/nginx/error.log" failed (13: Permission denied) Disabling SELinux in this case also worked around the error. I believe this is an issue in the latest container-selinux package. Whenever you report an error with SELinux always attach the AVC messages. ausearch -m avc -ts recent. Also give me ps -eZ | grep docker I suspect that docker is running with something like container_runtime_t:s0-s0:c10123 It used to run as container_runtime_t:s0 I believe this is related to a problem we have seen in Fedora about docker leaking fds into the container to be used for stdin, stdout and stderr. I changed the way that the container runtimes run which is causing a new SELinux issue. There's no `ausearch` on RHELAH, so the best I can give you is some grepped journal entries. # journalctl -b | grep -e avc -e audit -e denied Jun 12 13:39:56 micah-rhelah-vm0609a.localdomain kernel: type=1401 audit(1497274796.569:12): op=security_compute_av reason=bounds scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:svirt_lxc_net_t:s0-s0:c0.c1023 tclass=process perms=transition,sigchld,sigstop,signull,signal,getattr Jun 12 13:39:56 micah-rhelah-vm0609a.localdomain kernel: type=1401 audit(1497274796.603:13): op=security_compute_av reason=bounds scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:svirt_lxc_net_t:s0-s0:c0.c1023 tclass=process perms=transition,sigchld,sigstop,signull,signal,getattr Jun 12 13:40:29 micah-rhelah-vm0609a.localdomain kernel: type=1400 audit(1497274829.974:14): avc: denied { open } for pid=14526 comm="httpd" path="pipe:[78235]" dev="pipefs" ino=78235 scontext=system_u:system_r:svirt_lxc_net_t:s0:c533,c834 tcontext=system_u:system_r:container_runtime_t:s0-s0:c0.c1023 tclass=fifo_file Jun 12 13:40:29 micah-rhelah-vm0609a.localdomain dockerd-current[5726]: (13)Permission denied: AH00091: httpd: could not open error log file /proc/self/fd/2. # ps -eZ | grep docker system_u:system_r:container_runtime_t:s0-s0:c0.c1023 5726 ? 00:00:45 dockerd-current system_u:system_r:container_runtime_t:s0-s0:c0.c1023 5765 ? 00:00:03 docker-containe grep avc /var/log/audit/audit.log (In reply to Daniel Walsh from comment #8) > grep avc /var/log/audit/audit.log That doesn't exist on RHELAH systems. Yes well you gave me the AVC's anyways. journalctl -b | grep -i avc :^) (In reply to Micah Abbott from comment #9) > (In reply to Daniel Walsh from comment #8) > > grep avc /var/log/audit/audit.log > > That doesn't exist on RHELAH systems. Well, I won't make a blanket statement. But it doesn't exist on the system I reproduced this on. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1626 |