Bug 1318690

Summary: Can't use shared volume mounts with docker 1.10
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Walsh <dwalsh>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: adimania, admiller, amurdaca, dustymabe, dwalsh, extras-qa, ichavero, jcajka, jchaloup, lsm5, lsu, marianne, miminar, vbatts
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1318547 Environment:
Last Closed: 2016-06-23 16:18:01 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: 1318547    
Bug Blocks:    

Description Daniel Walsh 2016-03-17 14:03:22 UTC
+++ This bug was initially created as a clone of Bug #1318547 +++

Description of problem:

The MountFlags=slave option is set in the docker systemd unit file which is causing shared mounts to not work with docker 1.10. I have not changed the docker.service unit file on my atomic host and it has that MountFlags=slave set in the unit file:

[vagrant@vanilla-f23atomic ~]$ rpm -qV docker | grep docker.service
.......T.    /usr/lib/systemd/system/docker.service
[vagrant@vanilla-f23atomic ~]$ grep Mount /usr/lib/systemd/system/docker.service
MountFlags=slave


I have been told this is not what we want: https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2016-March/msg00083.html


Version-Release number of selected component (if applicable):
[vagrant@vanilla-f23atomic ~]$ rpm -q docker
docker-1.10.2-6.git0f5ac89.fc23.x86_64

How reproducible:
Always


Steps to Reproduce:
[vagrant@vanilla-f23atomic ~]$ sudo mount --make-shared /
[vagrant@vanilla-f23atomic ~]$ sudo docker run -it --privileged --rm -v /tmp/sharedfolder:/tmp/sharedfolder:shared sshfs /bin/bash  
docker: Error response from daemon: Cannot start container 7e99752dd8f2812a7d7acaa58594504be936b6f37aa77b6521a7098450343837: Path /tmp/sharedfolder is mounted on /sysroot but it is not a shared mount..

Actual results:
Can't run a docker container with :shared volume mount. See error message.

--- Additional comment from Daniel Walsh on 2016-03-17 10:02:47 EDT ---

Lokesh please remove this line from all Fedora and RHEL versions of docker-1.10.

Comment 2 Daniel Walsh 2016-06-03 13:19:01 UTC
I believe this is fixed in docker-1.10.

Comment 4 Luwen Su 2016-06-11 17:29:58 UTC
In docker-1.10.3-40.el7.x86_64, works well

# sudo mount --make-shared /
# sudo docker run -it --privileged --rm -v /tmp/sharedfolder:/tmp/sharedfolder:shared fedora /bin/bash  
[root@7ff4197b954f /]# exit

Comment 6 errata-xmlrpc 2016-06-23 16:18:01 UTC
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-2016:1274