+++ 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.
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
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