Bug 1185423 - MountFlags=private in docker.service prevents admin from exposing new storage to docker
Summary: MountFlags=private in docker.service prevents admin from exposing new storage...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docker-io
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-23 17:13 UTC by Lars Kellogg-Stedman
Modified: 2015-02-04 08:00 UTC (History)
13 users (show)

Fixed In Version: docker-io-1.4.1-8.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-04 08:00:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lars Kellogg-Stedman 2015-01-23 17:13:57 UTC
Setting MountFlags=private in docker.service means that any storage mounted on the host after starting Docker will be unavailable for docker containers.  For example, I wanted to expose a directory from a remote server to a Docker container:

  mkdir /data/content
  mount remote-server:/vol/content /data/content
  docker run -v /data/content:/content larsks/thttpd -d /content

This fails because Docker does not see the mount onto /data/content. It only sees the content of the underlying directory, not the mounted filesystem.

I think we want MountFlags=slave instead, which would prevent mounts inside the Docker mount namespace from propagating to the global namespace while still allowing global mounts to be available to docker containers.

Comment 1 Fedora Update System 2015-01-25 05:15:20 UTC
docker-io-1.4.1-8.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/docker-io-1.4.1-8.fc21

Comment 2 Fedora Update System 2015-02-04 08:00:23 UTC
docker-io-1.4.1-8.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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