Skip to content

Precreated docker volumes are removed on an NFS volume store when the linked application is destroyed #8642

Open
@leander091

Description

@leander091

Summary

Docker volumes are removed on an NFS volume store when the linked application is destroyed. This happens also when I create an volume in advance and link it to the application. At the same time the data on that volume is destroyed too.
If I provision the same volume on the de default volume store, the volume is persisted as expected after the application removal.

Environment information

vSphere and vCenter Server version

vCenter 7.0.0.10400
VMware ESXi, 7.0.0, 16324942

VIC version

VIC v1.5.5

VCH configuration

I've created my VCH like this:
./vic-machine-linux create --name Vch01 --compute-resource Intel-Cluster --cpu-reservation 1 --cpu-shares normal --memory-reservation 1 --memory-shares normal --endpoint-cpu 1 --endpoint-memory 2048 --image-store Datastore01 --base-image-size 8GB --volume-store Datastore01:Datastore01 --volume-store Datastore01:default --volume-store "nfs://nfshost/data/datastore02?uid=0&gid=0:Datastore02" --bridge-network Vch-bridge01 --bridge-network-range 172.16.0.0/12 --public-network Access --public-network-ip 168.192.254.31/24 --public-network-gateway 168.192.254.1 --dns-server 168.192.254.2 --tls-cname vch01.example.com--certificate-key-size 4096 --registry-ca /etc/docker/certs.d/vic.example.com/ca.crt --user Administrator@VSPHERE.LOCAL --thumbprint 6B:43:26:6A:B8:49:35:88:1D:A9:FC:7D:A1:18:A5:AC:B3:8D:38:B9 --target vcenterhost.com/Datacenter --ops-user vic-ops@example.com--ops-grant-perms

I have removed some sensitive values in the configuration string above.

Details

I can provide an log bundle if necessary.

Steps to reproduce
  • Create an volume store on an NFS share.
  • Create the docker volume with the following advanced property: VolumeStore: Datastore02
  • Create an Application and link the volume to the newly created container as an existing volume.
  • Start the container and check if the contents are available.
  • Delete the application using the VIC gui or with docker rm
Actual behavior

The Volume is removed like the container itself and the data is lost without backups

Expected behavior

The volume persist after container removal.

Logs

See also

Troubleshooting attempted

  • Searched GitHub for existing issues. (Mention any similar issues under "See also", above.)
  • Searched the documentation for relevant troubleshooting guidance.
  • Searched for a relevant VMware KB article.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions