-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
volumes mounted in incorrect order #7792
Comments
Restarting the container made it worse:
Now I can't see anything in |
Yes I've had, probably, the same issue on docker 1.2.0. Seems bind mounted volumes aren't always mounted. Actually it's sort of not mounted 70% of the time or something so it's not rare. |
There was some re-factoring that happened here, though I cannot reproduce this. |
Also, please post your |
Here's my info:
|
@johnae And |
@johnae The volumes probably are mounted, but the mountpoint is being hidden by another closer to the root. What's the output of |
@Supermathie you may be right. I was using a third party container which was the one I was having trouble with. The instructions told me " to store data on the host, do this: -v /path/on/host/to/data/db:/data/db", however the container (Dockerfile) defines a volume at /data. I think that's what is causing the problems. Most of the time it wouldn't create the host mounted one or it was, as you say, obscured. So /data is mounted via Dockerfile and that seems to already contain a db directory. Then I mount /some/path/here:/data/db and it gets obscured (about 70% of the time which is weird). |
@cpuguy83 here you are:
|
@Supermathie Is this just an issue with /proc/mounts or is your stuff not actually being mounted? |
@cpuguy83 Neither, really. Technically the volumes are mounted but some of them are inaccessible due to being mounted in the incorrect order.
|
@cpuguy83 Have I sufficiently explained the problem? |
We are seeing this unpredictable volume mounting order as well. With 1.1.2, we could count on them being mounted in order, but with 1.2.0 it seems to be random. If you need an additional example to reproduce, I would be happy to provide one. |
I think this is because of the map randomization in go ~1.3 |
So we need something that can sort them in order from shallow to deep so |
There's essentially two choices:
Sorting from shallow to deep probably makes the most sense. It'd be a fairly pathological case where keeping the original order was necessary and sorting from shallow to deep broke it. |
I think sorting is our best option because we cannot keep the order. Go randomizes maps and there is nothing we can do about that unless we create our own type with order information. I think sorting is the best |
SGTM |
See #8055 |
Looks like #5489 has struck again, but this time I think I've figured it out.
From inside the container I can't see one of the mountpoints:
Inspecting the container in question shows they SHOULD be there:
But checking /proc/mounts from inside the container (which is presumably correct) shows:
It looks as though docker mounted
/shared/backups
first, then hid it with the/shared
mount.The text was updated successfully, but these errors were encountered: