New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared subtrees not working under Debian #19625
Comments
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information. For more information about reporting issues, see CONTRIBUTING.md. You don't have to include this information if this is a feature request (This is an automated, informational response) BUG REPORT INFORMATIONUse the commands below to provide key information from your environment:
Provide additional environment details (AWS, VirtualBox, physical, etc.): List the steps to reproduce the issue: Describe the results you received: Describe the results you expected: Provide additional info you think is important: ----------END REPORT --------- #ENEEDMOREINFO |
Initially I tried this under Debian 8.2, with a |
@lox The dir being shared needs to be flagged as shared as well (or it's parent needs to be shared). |
Brian, I've spent a considerable time investigating this and reading the I'm trying to parse your response, do you mean the original mount point? If I've also tried As I said, I've had this working fine under several Ubuntu installations. On Sunday, January 24, 2016, Brian Goff notifications@github.com wrote:
|
Consider this example:
This should work. |
Ok, so have a brand new Debian Stretch system. This is what
Installing docker via
|
The line from
|
Checked the parsing from https://github.com/docker/docker/blob/729c9a97822ebee2c978a322d37060454af6bc66/pkg/mount/mountinfo_linux.go:
The original code you linked to it seems like this should be reading the correct value from |
Of course it works just fine when I build a binary from master. |
Hmmm, but it doesn't work when running under systemd. |
Ok, I've verified that with the latest release the problem occurs when docker daemon is running under systemd, but not when running in the foreground. Perhaps some issue with the strange things that systemd does with cgroups and the debian kernel @cpuguy83? |
What are the |
Hah, just got there via #12544. It was the default service installed by the docker package, which has Is this expected behaviour? |
@lox yes, that's expected when |
It would have been expected if I'd set it thus, but it was the default. Sounds like it would be at least worth adding to the documentation? I imagine lots of people are going to end up wanting to run FUSE filesystems with the subtree stuff and will get very confused. |
I think that makes sense if there's nothing along those lines for the systemd case. |
Looks like Docker Machine will give you |
@errordeveloper if you have ideas what needs to be added to the documentation, could you open a pull request? |
@thaJeztah hm, I think this is just a bug in Docker Machine, which I'm going to report to and provide a PR, although had there been any reason for this setting to appear in the first place? Which is the very first unit file where this appears? |
@thaJeztah ping. |
@errordeveloper looks like |
I hit exactly the same issue (engine 1.10.3 on Ubuntu 14.04 LTS). I did:
... and I still get Before I open a separate issue (since this disturbingly to be the same thing), does anybody know a way to double-check the mount flags? |
(Confirming that the problem is caused by systemd, since running the Engine manually instantly fixes the issue.) |
Also:
🍑 |
If anybody runs into this later, here are a few useful commands.
systemctl status docker | grep Loaded (In my case, one had been installed into
nsenter --mount=/proc/$(cat /var/run/docker.pid)/ns/mnt findmnt -o TARGET,PROPAGATION (This allowed me to confirm that it was set to
ls -l /proc/1/ns/ /proc/$(cat /var/run/docker.pid)/ns/ (This allowed me to confirm that the Engine was in its own namespace.) I hope this helps! |
You can override the MountFlags value in the default unit with a systemd drop-in directory. e.g.: mkdir -p /etc/systemd/system/docker.service.d/
cat <<EOF > /etc/systemd/system/docker.service.d/clear_mount_propagtion_flags.conf
[Service]
MountFlags=shared
EOF so you don't have to modify the default unit, which might get reset during a docker upgrade. |
Hey folks, can this issue be re-opened and considered for the next release?? I think here is enough activity, it's definitely a problem for anyone trying to use the mount propagation feature, do people agree? |
@errordeveloper can you open a pull request that changes the systemd unit file; https://github.com/docker/docker/blob/master/contrib/init/systemd/docker.service#L14, then we can discuss on that PR. (I'm not sure if there's side effects to that change that need to be discussed) |
@thaJeztah cheers, here it is #22806! |
sudo mount --make-shared / |
Required to allow bind propegation options to be set on individual bind-mounts. See moby/moby#19625. Also https://access.redhat.com/articles/2938171 for rational for using this option in RHEL/CentOS 7.3. Change-Id: I8a63c044e15d7ca0f54654e9fc9c5d878461aa25 Related-bug: 1730533
Required to allow bind propegation options to be set on individual bind-mounts. See moby/moby#19625. Also https://access.redhat.com/articles/2938171 for rational for using this option in RHEL/CentOS 7.3. Change-Id: I8a63c044e15d7ca0f54654e9fc9c5d878461aa25 Related-bug: 1730533 (cherry picked from commit 2366b5b)
I'm having issues getting the new
--volume /mnt/shared:/shared:shared
feature of 1.10 working (from #17034).I had this working under ubuntu. One of the key differences I noted was that
mount
indicated that the mount/shared
had-o bind
where as under debian, it doesn't seem to.The text was updated successfully, but these errors were encountered: