-
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
compose scale (on swarm) with volumes_from #1899
Comments
Yeah, this won't work with Swarm's scheduling constraints as they currently function. The problem is that the scheduling constraint you want to express is "each This is the use case for the "pods" concept discussed in moby/moby#8781. It's tough to achieve with Compose and Swarm as they currently work. As a workaround for now, you could try using an explicit host path instead of ping @vieux and @aluzzardi who might have better ideas. |
thanks @aanand . instead of using data volume, i've decided to use consul/vault, esp i'm already using consul for swarm. but it is an odd behavior when i use volume from, and scale together, it somehow not satisfy with finding one of the data volume but tries to find all data volumes. |
Looks like the @aanand How does volumes from and scaling work together? |
I don't think it's ever been formally stated how Which is nonsense - the volumes from each container would just override the previous one! So we should definitely change it to pick just one. But which one? |
how about the first one it could mount? |
hi all,
I have the following docker-compose.yml
I have a 2-node docker swarm setup using consul as backend. when i issue, docker-compose up -d, i would have both dataVolume & app running on the same node.
then, when i tries to scale it, docker-compose dataVolume=2 app=2, it started another container in the 2nd node (appears to be by chance, cause it could have started on the first node too) and when trying to start app on node 2 (i've specified the port so it has to start in node 2), i got an error like this.
and i've verified that those 2 volumes-from are the container id of the two dataVolume but that are on different nodes, i guess that's why it couldn't find it.
Now the question is, how to get it to work? the scenario is, I have an application that needs to read in the SSL certificates & keys. I'm trying to put that onto a container and when i scale it, i'd need the data container (ssl certs) to be scaled too.
Thanks,
Arthur Tsang
The text was updated successfully, but these errors were encountered: