Cloudstor: Prevent deletion of underlying Azure file share when docker volume is removed.
Expected behavior
For Azure Cloudstor plugin: Config switch to prevent deletion of underlying File Share if the Docker Volume is removed.
Actual behavior
Right now, the underlying file share is always deleted which may be unexpected causing loss of data.
Information
When using the legacy https://github.com/Azure/azurefile-dockervolumedriver, if the docker volume was deleted, the underlying file share was not effected. This is the behavior I would expect. Even when using the local docker volume driver with a mount point on machine such as /data, the dir is not deleted when the docker volume is removed.
For the Cloudstor plugin, when the docker volume is removed, the underlying file share in Azure Storage is also deleted. This is completely unexpected from the behavior of the legacy azure volume driver or even the default local driver.
Can we have at least a config switch and some documentation. Some of us want to remove the volume while keeping the azure file share intact.
Similar issue filed: https://forums.docker.com/t/option-for-cloudstor-plugin-to-not-delete-file-share-on-removal-of-volume/52295
- Full output of the diagnostics from "docker-diagnose" ran from one of the instance
- A reproducible case if this is a bug, Dockerfiles FTW
- Page URL if this is a docs issue or the name of a man page
Steps to reproduce the behavior
- ...
- ...
Experiencing the same thing. The files in an azure storage account should not be blindly smoked if you remove a volume. This seems analogous to mounting and NFS share… should “unmount” smoke the data in the share? No, neither should this.
https://github.com/docker/for-azure/issues/74