Docker Community Forums

Share and learn in the Docker community.

Docker Swarm Mode (1.12rc3) - Strange behaviour? Volumes


(Jon Busby) #1


So I’ve been experimenting with Docker Swarm Mode (1.12rc2 and rc3). Awesome stuff - and incredibly easy to setup… however - I’ve noticed some weird behaviour…

So - I was running a Jenkins instance on one of instances. Everything was working fine - and I was going to backup the Jenkins folder somewhere (it was being exposed as a volume). I close down a stack (using “docker stack rm <>”) for another application, and for some reason, swarm decides to re-balance the jenkins container onto another node…

No biggy - but of course, all of my data and settings are now gone.

So - two questions

  1. Why was this container rebalanced? This would cause a lot of problems with db’s and other stuff
  2. How can I persist data between containers and nodes?



(Dvohra) #2

If a service is removed, all volumes created by the service’s tasks are deleted. Did the stack that was removed include a service managing the container? Or, was a volume shared between services?

(Jon Busby) #3

Neither, the stack removed was separate (containing a wordpress and mysql container)… whilst this was a jenkins service!