vmware-archive / vsphere-storage-for-docker

vSphere Storage for Docker
https://vmware.github.io/vsphere-storage-for-docker
Apache License 2.0
251 stars 95 forks source link

Migrating Docker vm to another ESX host results in volumes which cannot be mounted. #2096

Open darkl0rd opened 5 years ago

darkl0rd commented 5 years ago

Setup: VSphere cluster, consisting of 4 ESX hosts. Several Docker Hosts running on one of the ESX hosts, many of it's containers are using persistent volumes.

When the Docker VM is migrated to another ESX host, some, but not all of the volumes no longer correctly attach. After restarting the Docker Engine (sometimes several times), the volumes can be attached correctly. Strangely enough, in some cases the containers do start, but when inspecting the container, the volume isn't actually mounted; instead a "local" volume is used (even though docker volume ls does not show the volume as being local). This can be verified by docker exec mount

Summary:

mitziwebb commented 4 years ago

We have also seen this issue.

liqdfire commented 4 years ago

It happens because the docker plugin has a bug in the reference counter feature, so that when a container is stopped it thinks there are still containers referencing the volume and does not detach it from the vm host.