| Summary: | [extras-rhel-7.2.7] overlay2: Docker fails to run container with overlay2 graph driver configured | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Vivek Goyal <vgoyal> |
| Component: | docker-latest | Assignee: | Daniel Walsh <dwalsh> |
| Status: | CLOSED NOTABUG | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 7.3 | CC: | amurdaca, dwalsh, jhonce, mpatel, p10sonu, pasik |
| Target Milestone: | rc | Keywords: | Extras, UpcomingRelease, ZStream |
| 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: | 2016-08-24 12:09:56 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: | |
|
Description
Vivek Goyal
2016-08-22 19:10:01 UTC
#docker run -ti fedora ls ls: error while loading shared libraries: libselinux.so.1: cannot open shared object file: Permission denied Vivek, what is the output of ausearch -m avc -ts recent This looks like an SELinux issue. Dan,
It indeed is SELinux issue. I set selinux in permissive mode and running container worked. Following is avc.
type=AVC msg=audit(1471961779.544:9632): avc: denied { read } for pid=6527 comm="bash" name="libtinfo.so.6.0" dev="dm-0" ino=1363793 scontext=system_u:system_r:svirt_lxc_net_t:s0:c786,c1001 tcontext=system_u:object_r:docker_var_lib_t:s0 tclass=file
overlay works and I see the label docker_share_t on overlay dir and its child. But overlay2 still is docker_var_lib_t and that probably is the problem. This looks like labeling is not working. docker_var_lib_t is the default label of /var/lib/docker, which is not supposed to be used in docker. Overlay and SELinux do not work together in RHEL7. Until we get the patches in. So your dockerd should not be run with selinux-enabled. Sadly the current patch that prevents this only looks for overlay not overlay2. Ok, it worked for me when I removed --selinux-enabled from /etc/sysconfig/docker-latest. So for now, people can use it the way they use overlay. That is remove --selinux-enabled and things should work. Vivek, I wonder why is this not a bug, disabled selinux can't be the fix ? Looks like I am missing something? p10sunu, I am the last person in the world to tell people to disable SELinux. But until the RHEL7.4 kernel ship the choice is to run SELinux with Device Mapper Back end or disable SELinux for container work loads when running Overlay. The kernel needs to be fixed to make both run together. |