-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Since docker 1.3.0 / fig 1.0.0 volumes are not mounted when fig up'ing existing containers #622
Comments
This also happens with docker 1.3.1 and fig 1.0.1. fig run mycontainer bash The volumes are mounted just fine. |
Are you using volumes or volumes_from? A sample fig.yml may help in debugging. |
My fig.yml:
All folders defined as volumes are on the same level as fig.yml. |
This seems correct to me. Some things you could try to debug it:
|
Perhaps it's a silly question.... but are you using a Virtual Machine to run docker and fig ? If so, do the paths referenced in your "volumes" directives exists inside the VM? |
I am running this directly on my notebook (ubuntu 14.10, no virtual machine).
and
and neither worked. |
@dnephin yes, doing
solves it but only until the next reboot/service docker restart. Test run:
Volumes are mounted just fine.
Volumes still work.
Volumes fail to mount! But running:
The Volumes work without problems. |
Same here. Any progress on this? |
FWIW, the issue seems fixed for me with docker 1.3.2 / fig 1.0.1 |
I'm using docker 1.3.2 / fig 1.0.1. Still doesn't work for me. |
@schickling : yeah, spoke too soon, it still doesn't work for me either eventually. |
Hello, I have the same issue. Can't bind-mount volumes with
Running with
But docker inspect shows volume is not bind-mounted:
I think is not a problem of fig, but a problem of docker-py with newer versions of docker. Looking at docs link above, seems that
Also seems other projects are running the same issue: |
I've faced the exact same issue using
Reverting docker version back to lxc-docker-1.3.3 solved the problem for now. |
@s2ugimot for docker 1.4.0 see #723 |
has anyone fixed this |
I believe #711 will resolve the original issue |
Awesome - I'm new to github - how do I know what version #711 is in or whether it is in at all |
I have the same problem:
|
Same issue
|
From my experience, docker 1.4.1 + fig 1.0.1 does not work also: #443 (comment) |
This does not solve the issue for me :-/ |
Same experience as @gquemener here: docker 1.4.1 + fig 1.0.1. adding host volumes does not work unless i do a 'fig rm' first. Not so-sure what happens on restarts. #723 |
I also experienced the same thing. For one of my containers the 'fig up' would not mount host volumes. However it would mount if I used 'fig run --rm mycontainer bash'. Running 'fig rm mycontainer' fixed it. |
Same issue: docker 1.4.1 + docker-compose 1.1.0-rc1. Fixed it to run 'docker rm container' before 'docker-compose up' |
+1, I just wasted a lot of time on this.
|
+1 This "feature" actually makes docker+fig a tool to make a deploy in just two days :)
|
+1
|
Can anyone produce a minimal failing case? I'm currently unable to reproduce. Here's my test case:
|
@aanand 1.5 has some fixes in it that would resolve this, and maybe one more in 1.5.1 for some fig users. |
I suspect (based on the early comments on this thread, and my personal experience helping people new to fig) that this is often an issue with copying old volumes during If you have an existing container with data volumes, and you change the content of those volumes, when you I think #858 helps with this. There is still a case where the volume path hasn't changed but the contents or structure of the data volume have changed. That one is harder to deal with and maybe just needs to be called out better in the docs. |
@dnephin it's not my case. doesn't mount the volume. If i go to the folder where the volume should be mounted I don't have any data at all. |
@nomadster can you
|
Cannot reproduce right now, I've switched to docker 1.1.2 and fig 0.5.2 to be able to work :) |
@aanand, I've got a scenario with fig where volumes aren't re-mounted correctly upon fig up when docker daemon has been restarted between stop/kill and up. I can provide you (privately preferably) the full log with docker inspect outputs. It forces me to fig rm my containers every morning after booting my workstation (event if containers where "gracefully" fig-stopped before the reboot or docker daemon restart) |
@morvans Does the problem only surface when the docker daemon has been restarted? If so, that's a separate issue, and it's worth investigating whether that behaviour can be reproduced using Docker without Fig. Can you produce a failing case with private information stripped out? |
Ok I'll try to get back to you with a stripped down fig.yml and/or a test case involving docker alone. |
I can't mount relative folder through fig on centos7: [root@localhost using-fig]# uname -a [root@localhost fig-master]# fig --version [root@localhost fig-master]# docker version fig.yml: /home/apps/using-fig/fig.yml
es:
image: library/elasticsearch:1.4.3
volumes:
- elasticsearch:/data
ports:
- "9200:9200"
- "9300:9300" [root@localhost using-fig]# pwd [root@localhost using-fig]# ls -l [root@localhost using-fig]# ls -l elasticsearch/ so when I run fig up -d [root@localhost using-fig]# fig up -d [root@localhost using-fig]# docker ps [root@localhost using-fig]# docker exec -ti usingfig_es_1 bash however if I change fig to absolute path fig.yml: /home/apps/using-fig/fig.yml
es:
image: library/elasticsearch:1.4.3
volumes:
- /elasticsearch/data:/data
ports:
- "9200:9200"
- "9300:9300" everything works just fine |
@dnephin I've managed to find some time to check for the bug:
I've deleted every single image I had and built them from scratch then run fig up (some container use links, I can provide the fig.yml privately if needed).
Now I Just in case this will happen again later on I've pasted the output of the command you asked here |
Ok, this sounds a lot like re-using old volumes, and might be fixed by #858 |
@nomadster, if you restart the docker daemon between fig stop and fig up, are the volumes re-mounted correctly ? |
Some of the container doesn't start correctly. I suppose because the volumes are not mounted correctly. |
FWIW, I updated to docker 1.5.0 and the issue seems to be gone. |
yes, 1.4.0 not work , but 1.5.0 work fine |
@morvans Yeah, I think the problem was mainly coming from docker itself and the last big update was meant to solve big mounting issues. |
I'm closing this issue as it seems to be a confusion of different reports - if anyone can produce a minimal failing case, please open a new one. |
I'm seeing some behavior that seems related and I have a reduced test case here: #2776 |
Hi, im experienceing with same problem, after restarting my server the containers are starting but not mounting the volumes, the changes i have done to my server is updated to Ubuntu server 15.10 and docker-compose version is 1.6.0, but when i goto my docker-compose folder and start them then volumes are mounting correctly. |
You might be hitting #2912 |
Since docker 1.3.0 / fig 1.0.0 (I upgraded both at the same time), I cannot fig up my projects without fig rm'ing before.
If I do fig up on already existing (stopper) containers, volumes specified in fig.yml aren't remounted (default docker mounts instead, so empty dirs).
fig rm && fig up recreates everything correctly but for locally built containers this is pretty time consuming.
The text was updated successfully, but these errors were encountered: