{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/25658","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/25658/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/25658/comments","events_url":"https://api.github.com/repos/docker/docker/issues/25658/events","html_url":"https://github.com/docker/docker/issues/25658","id":170847230,"number":25658,"title":"mount volumes within ro volumes causes permanent machine mount failure","user":{"login":"stampycode","id":5627756,"avatar_url":"https://avatars.githubusercontent.com/u/5627756?v=3","gravatar_id":"","url":"https://api.github.com/users/stampycode","html_url":"https://github.com/stampycode","followers_url":"https://api.github.com/users/stampycode/followers","following_url":"https://api.github.com/users/stampycode/following{/other_user}","gists_url":"https://api.github.com/users/stampycode/gists{/gist_id}","starred_url":"https://api.github.com/users/stampycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampycode/subscriptions","organizations_url":"https://api.github.com/users/stampycode/orgs","repos_url":"https://api.github.com/users/stampycode/repos","events_url":"https://api.github.com/users/stampycode/events{/privacy}","received_events_url":"https://api.github.com/users/stampycode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/more-info-needed","name":"status/more-info-needed","color":"C6A49A"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-12T10:55:44Z","updated_at":"2016-08-12T12:27:46Z","closed_at":null,"body":"TL;DR - doing this in your `docker-compose.yml`:\r\n```\r\nvolumes:\r\n       - ./abcd:/abcd:ro\r\n       - ./defg:/abcd/defg:ro\r\n```\r\nwill permanently break volume mounts in your current docker-machine and all subsequently created docker-machines on the same host, until the host is rebooted.\r\n\r\n\r\n**Output of `docker version`:**\r\n```\r\nClient:\r\n Version:      1.11.1\r\n API version:  1.23\r\n Go version:   go1.5.4\r\n Git commit:   5604cbe\r\n Built:        Tue Apr 26 23:44:17 2016\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      1.12.0\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   8eab29e\r\n Built:        Thu Jul 28 23:54:00 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n\r\n**Output of `docker info`:**\r\n```\r\nContainers: 3\r\n Running: 1\r\n Paused: 0\r\n Stopped: 2\r\nImages: 36\r\nServer Version: 1.12.0\r\nStorage Driver: aufs\r\n Root Dir: /mnt/sda1/var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 59\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: null bridge host overlay\r\nKernel Version: 4.4.16-boot2docker\r\nOperating System: Boot2Docker 1.12.0 (TCL 7.2); HEAD : e030bab - Fri Jul 29 00:29:14 UTC 2016\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 995.9 MiB\r\nName: newm\r\nID: ZWTS:ZUF2:VZOL:IDVC:WUWH:J3IK:GCR7:JT4G:QDTV:IYG4:RBBQ:ZC4R\r\nDocker Root Dir: /mnt/sda1/var/lib/docker\r\nDebug mode (client): false\r\nDebug mode (server): true\r\n File Descriptors: 24\r\n Goroutines: 43\r\n System Time: 2016-08-12T10:27:29.323758623Z\r\n EventsListeners: 1\r\nRegistry: https://index.docker.io/v1/\r\nLabels:\r\n provider=virtualbox\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nRunning docker on OSX 10.11.5 locally.\r\n\r\n\r\n**Steps to reproduce the issue:**\r\n1 - create `docker-compose.yml`\r\n```\r\nversion: '2'\r\nservices:\r\n  crashtestdummy:\r\n     container_name: testcont\r\n     volumes:\r\n       - ./abcd:/abcd:ro\r\n       - ./defg:/abcd/defg:ro\r\n       #  ^^^ this line is the problem, mounting within a ro mount\r\n     image: nginx\r\n```\r\n2 - create test data\r\n```\r\nmkdir abcd && touch abcd/foo\r\nmkdir defg && touch defg/bar\r\n```\r\n3 - build\r\n```\r\nPulling crashtestdummy (nginx:latest)...\r\nlatest: Pulling from library/nginx\r\n51f5c6a04d83: Pull complete\r\na3ed95caeb02: Pull complete\r\n51d229e136d0: Pull complete\r\nbcd41daec8cc: Pull complete\r\nDigest: sha256:0fe6413f3e30fcc5920bc8fa769280975b10b1c26721de956e1428b9e2f29d04\r\nStatus: Downloaded newer image for nginx:latest\r\nCreating testcont\r\n\r\nERROR: for crashtestdummy  oci runtime error: rootfs_linux.go:53: mounting \"/mnt/sda1/var/lib/docker/aufs/mnt/db0db52cc8e9b82a60cef552707ffe6e37f738f1fe57efaf87a95cac618edc60/abcd/defg\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/db0db52cc8e9b82a60cef552707ffe6e37f738f1fe57efaf87a95cac618edc60\" caused \"mkdir /mnt/sda1/var/lib/docker/aufs/mnt/db0db52cc8e9b82a60cef552707ffe6e37f738f1fe57efaf87a95cac618edc60/abcd/defg: read-only file system\"\r\nAttaching to\r\n```\r\n4 - create a new machine\r\n```\r\n$ docker-machine create --driver virtualbox new4\r\n$ eval $(docker-machine env new4)\r\n```\r\n5 - fix `docker-compose.yml`\r\n```\r\nversion: '2'\r\nservices:\r\n  crashtestdummy:\r\n     container_name: testcont\r\n     volumes:\r\n       - ./abcd:/abcd:ro\r\n       - ./defg:/defg:ro\r\n     image: nginx \r\n```\r\n6 - build\r\n```\r\nPulling crashtestdummy (nginx:latest)...\r\nlatest: Pulling from library/nginx\r\n51f5c6a04d83: Pull complete\r\na3ed95caeb02: Pull complete\r\n51d229e136d0: Pull complete\r\nbcd41daec8cc: Pull complete\r\nDigest: sha256:0fe6413f3e30fcc5920bc8fa769280975b10b1c26721de956e1428b9e2f29d04\r\nStatus: Downloaded newer image for nginx:latest\r\nCreating testcont\r\n```\r\n7 - attach and inspect the mounts\r\n```\r\ndocker exec -it testcont bash\r\nroot@c84386f82b63:/# ls -l /abcd\r\ntotal 0\r\nroot@c84386f82b63:/# ls -l /defg\r\ntotal 0\r\nroot@c84386f82b63:/#\r\n```\r\n\r\n**Describe the results you received:**\r\nAll mount points are now broken for this docker machine (and all docker machines created after this point) until the host system is rebooted.\r\nExisting docker machines created before this point continue to work normally.\r\nIf I fix the docker-compose.yml file, create a new docker machine and repeat the above steps, there are no errors about mount points failing, they just aren't mounted at all.\r\n\r\n**Describe the results you expected:**\r\nThe second mount point described in the docker file should be broken, the other should be fine.\r\nResolving the issue in the docker-compose.yml file should fix the problem when the container is rebuilt.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nThis is reproducible every time for me.\r\n\r\ndocker-inspect on the second machine shows the mounts should be fine, no errors were reported, but the volumes are simply not mounted.\r\n```\r\n\"Mounts\": [\r\n            {\r\n                \"Source\": \"/data/docker-crash-test/defg\",\r\n                \"Destination\": \"/defg\",\r\n                \"Mode\": \"ro\",\r\n                \"RW\": false,\r\n                \"Propagation\": \"rprivate\"\r\n            },\r\n            {\r\n                \"Source\": \"/data/docker-crash-test/abcd\",\r\n                \"Destination\": \"/abcd\",\r\n                \"Mode\": \"ro\",\r\n                \"RW\": false,\r\n                \"Propagation\": \"rprivate\"\r\n            }\r\n        ],\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/239433079","html_url":"https://github.com/docker/docker/issues/25658#issuecomment-239433079","issue_url":"https://api.github.com/repos/docker/docker/issues/25658","id":239433079,"user":{"login":"stampycode","id":5627756,"avatar_url":"https://avatars.githubusercontent.com/u/5627756?v=3","gravatar_id":"","url":"https://api.github.com/users/stampycode","html_url":"https://github.com/stampycode","followers_url":"https://api.github.com/users/stampycode/followers","following_url":"https://api.github.com/users/stampycode/following{/other_user}","gists_url":"https://api.github.com/users/stampycode/gists{/gist_id}","starred_url":"https://api.github.com/users/stampycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampycode/subscriptions","organizations_url":"https://api.github.com/users/stampycode/orgs","repos_url":"https://api.github.com/users/stampycode/repos","events_url":"https://api.github.com/users/stampycode/events{/privacy}","received_events_url":"https://api.github.com/users/stampycode/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T12:27:46Z","updated_at":"2016-08-12T12:27:46Z","body":"my output from your cmd in a new machine:\r\n```\r\n$ docker run --rm --name=should-not-fail -v $PWD/abcd:/abcd:ro -v $PWD/defg:/defg:ro alpine sh -c 'ls -la /abcd && ls -la /defg'\r\nUnable to find image 'alpine:latest' locally\r\nlatest: Pulling from library/alpine\r\ne110a4a17941: Pull complete\r\nDigest: sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a\r\nStatus: Downloaded newer image for alpine:latest\r\ntotal 4\r\ndrwxr-xr-x    2 root     root            40 Aug 12 11:14 .\r\ndrwxr-xr-x   26 root     root          4096 Aug 12 12:27 ..\r\ntotal 4\r\ndrwxr-xr-x    2 root     root            40 Aug 12 11:14 .\r\ndrwxr-xr-x   26 root     root          4096 Aug 12 12:27 ..\r\n```"}}
{"actor":{"display_login":"stampycode"}}