Closed pshahzeb closed 6 years ago
The reason for this behavior is because there is only one master node in this setup and when the plugin on this single master node is broken (disabled), no ETCD server is running. There is no way to keep an update-to-date status for the vfile volumes, when there is no functioning master node.
However, the status of the volume is just as a reference for users, it won't stop the users to mount it again or delete it. Even the status is showing wrong "Mounted" state in this case, this volume can be reuse or can be deleted.
According to the above reasons, we will update the user guide to include more information about possible situations with a single master swarm cluster.
@pshahzeb Hi Shahzeb, can you check if the above solution sounds good to you? Thanks.
Thank you @luomiao for taking a look. Given that this is a corner case negative scenario, documenting it should suffice.
Volume status isn't updated as per its usage when a plugin is disabled and then enabled.
Steps to reproduce:
root@sc-rdops-vm18-dhcp-57-89:~# docker run --rm -it -v SharedVol:/mnt/myvol --name busybox-on-node1 busybox
root@sc-rdops-vm18-dhcp-57-89:~# docker volume ls DRIVER VOLUME NAME vfile:latest SharedVol vfile:latest SharedVol2 vfile:latest SharedVol3 vsphere:latest _vF_SharedVol2@vsanDatastore vsphere:latest _vF_SharedVol3@vsanDatastore vsphere:latest _vF_SharedVol@vsanDatastore
root@sc-rdops-vm18-dhcp-57-89:~# docker volume inspect SharedVol [ { "CreatedAt": "0001-01-01T00:00:00Z", "Driver": "vfile:latest", "Labels": {}, "Mountpoint": "/mnt/vfile/SharedVol/", "Name": "SharedVol", "Options": { "size": "10gb" }, "Scope": "global", "Status": { "Clients": [ "10.161.114.68" ], "File server Port": 30000, "Global Refcount": 1, "Service name": "vFileServerSharedVol", "Volume Status": "Mounted" } } ]
root@sc-rdops-vm18-dhcp-57-89:~# docker plugin disable -f vfile
/ # exit
docker plugin enable vfile
root@sc-rdops-vm18-dhcp-57-89:~# docker volume inspect SharedVol [ { "CreatedAt": "0001-01-01T00:00:00Z", "Driver": "vfile:latest", "Labels": {}, "Mountpoint": "/mnt/vfile/SharedVol/", "Name": "SharedVol", "Options": { "size": "10gb" }, "Scope": "global", "Status": { "Clients": [ "10.161.114.68" ], "File server Port": 30000, "Global Refcount": 1, "Service name": "vFileServerSharedVol", "Volume Status": "Mounted" } } ]