Bug 1318690 - Can't use shared volume mounts with docker 1.10
Summary: Can't use shared volume mounts with docker 1.10
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On: 1318547
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 14:03 UTC by Daniel Walsh
Modified: 2019-03-06 02:02 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1318547
Environment:
Last Closed: 2016-06-23 16:18:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1274 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2016-06-23 20:12:28 UTC

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


Note You need to log in before you can comment on or make changes to this bug.