Bug 1225556
| Summary: | docker relabel of volumes is buggy if the mode is "roz" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Laurent Rineau <laurent.rineau__fedora> |
| Component: | docker | Assignee: | Daniel Walsh <dwalsh> |
| Status: | CLOSED ERRATA | QA Contact: | Luwen Su <lsu> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | dwalsh, lsm5, lsu, mjenner, sghosh |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
Docker is not performing relabel, if the volume is specified with more then one object, z: works, roz: fails.
Consequence:
You can not mount a volume that is both readonly and needs a relabel at the same time.
Fix:
Fix the labeling check.
Result:
You can mount a volume that is both readonly and needs relabel at same time.
|
Story Points: | --- |
| Clone Of: | 1225549 | Environment: | |
| Last Closed: | 2015-06-23 09:30:00 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: | 1225549 | ||
| Bug Blocks: | 1211379 | ||
|
Description
Laurent Rineau
2015-05-27 16:30:48 UTC
I set the severity to "high" because that bug prevents the possibility to share read-only volumes between several containers. I had to downgrade to 1.5.0-28.el7 so that my containers work again. Fixed in docker 1.6.2 Is there somewhere I can get access to the sources of the docker-1.6.2 RPM? I would like to test it even before it is released. I read somewhere that the Git for RHEL is shared on CentOS here: git.centos.org, but it must be wrong because all I see at https://git.centos.org/forks/rpms!docker is about CentOS, and not RHEL. Laurent, could you try this please: 'yum install https://lsm5.fedorapeople.org/docker-1.6.2-12.el7.x86_64.rpm https://lsm5.fedorapeople.org/docker-selinux-1.6.2-12.el7.x86_64.rpm' I have the impression that it is not fixed. cgal ~/Git/cgal-testsuite-dockerfiles $ rpm -q docker docker-selinux docker-1.6.2-12.el7.x86_64 docker-selinux-1.6.2-12.el7.x86_64 cgal ~/Git/cgal-testsuite-dockerfiles $ docker version Client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): eb12bd2-dirty OS/Arch (client): linux/amd64 Server version: 1.6.2 Server API version: 1.18 Go version (server): go1.4.2 Git commit (server): eb12bd2-dirty OS/Arch (server): linux/amd64 cgal ~/Git/cgal-testsuite-dockerfiles $ ls -lZd test*/ drwxr-xr-x. lrineau geometryfactory system_u:object_r:svirt_sandbox_file_t:s0 testresults/ drwxr-xr-x. lrineau geometryfactory system_u:object_r:svirt_sandbox_file_t:s0 testsuite/ cgal ~/Git/cgal-testsuite-dockerfiles $ docker run --rm -v $PWD/testsuite:/testsuite:roz -v $PWD/testresults:/testresults:rwz fedora /bin/bash -c 'ls -lZd /test*' drwxr-xr-x. 500 501 system_u:object_r:svirt_sandbox_file_t:s0:c200,c705 /testresults drwxr-xr-x. 500 501 system_u:object_r:svirt_sandbox_file_t:s0:c200,c705 /testsuite One volume was declared with :roz and the other with :rwz, and both have been relabeled to the private security level s0:c200,c705. Is there something wrong in my command line to create/launch the container? sorry my bad, please try: yum install https://lsm5.fedorapeople.org/docker-1.6.2-14.el7.x86_64.rpm https://lsm5.fedorapeople.org/docker-selinux-1.6.2-14.el7.x86_64.rpm (In reply to Lokesh Mandvekar from comment #10) > sorry my bad, please try: yum install > https://lsm5.fedorapeople.org/docker-1.6.2-14.el7.x86_64.rpm > https://lsm5.fedorapeople.org/docker-selinux-1.6.2-14.el7.x86_64.rpm Thanks! It works fine for me # docker run -v /root/test:/test:z --rm rhel7 ls -aZ / | grep test drwxr-xr-x. root root system_u:object_r:svirt_sandbox_file_t:s0 test # docker run -v /root/test:/test:roz --rm rhel7 ls -aZ / | grep test drwxr-xr-x. root root system_u:object_r:svirt_sandbox_file_t:s0 test Move to verified (In reply to Lokesh Mandvekar from comment #10) > sorry my bad, please try: yum install > https://lsm5.fedorapeople.org/docker-1.6.2-14.el7.x86_64.rpm > https://lsm5.fedorapeople.org/docker-selinux-1.6.2-14.el7.x86_64.rpm I confirm those builds fix the bug. Thanks. 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://rhn.redhat.com/errata/RHBA-2015-1167.html The new build is now officially on CentOS 7. Thanks a lot for the fix! |