A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vmware/docker-volume-vsphere/issues/1638 below:

Volume remains attached even after we do 'Reset' of a vm · Issue #1638 · vmware-archive/vsphere-storage-for-docker · GitHub

This repository was archived by the owner on Nov 9, 2020. It is now read-only.

This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Volume remains attached even after we do 'Reset' of a vm #1638

Description

Steps to reproduce:

1. Created a volume
2. Ran a container with volume attached
3. While container is running, 'Reset' the vm
4. After vm comes back up, ```docker volume ls ``` still shows volume as attached.
5. Not able to remove the volume and we have a left-over volume.

Is the behavior in step - 4 expected?

If I 'Restart Guest OS' on a vm, volume gets detached after restart. So why is this behavior different in case of 'Reset' of a vm?

Logs have been attached at the end.

Steps and their output are as follows:

  1. Created a volume - volABC
root@photon-machine [ ~ ]# docker volume create -d vsphere:latest --name=volABC
volABC
root@photon-machine [ ~ ]#
root@photon-machine [ ~ ]# docker volume ls
DRIVER              VOLUME NAME
vsphere:latest      TestVolSuspend@sharedVmfs-0
vsphere:latest      VolZZZ@sharedVmfs-0
vsphere:latest      volABC@sharedVmfs-0
root@photon-machine [ ~ ]#

[root@sc-rdops-vm01-dhcp-20-85:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py volume ls
Volume          Datastore     VMGroup   Capacity  Used  Filesystem  Policy  Disk Format  Attached-to   Access      Attach-as               Created By    Created Date
--------------  ------------  --------  --------  ----  ----------  ------  -----------  ------------  ----------  ----------------------  ------------  ------------------------
VolZZZ          sharedVmfs-0  _DEFAULT  100MB     0     N/A         N/A     thin         photon-VM2.3  read-write  independent_persistent  photon-VM2.3  Tue Jul 25 20:50:26 2017
TestVolSuspend  sharedVmfs-0  _DEFAULT  100MB     15MB  ext4        N/A     thin         photon-VM0.3  read-write  independent_persistent  photon-VM0.3  Wed Jul 26 20:10:58 2017
volABC          sharedVmfs-0  _DEFAULT  100MB     13MB  ext4        N/A     thin         detached      read-write  independent_persistent  photon-VM0.3  Wed Jul 26 21:26:05 2017

[root@sc-rdops-vm01-dhcp-20-85:~]

  1. Ran a container with volume mounted.
root@photon-machine [ ~ ]# docker run -it --volume-driver=vsphere:latest -v volABC@sharedVmfs-0:/vol1 --name ubABC ubuntu
root@4f0d8f7fb8cd:/#
root@4f0d8f7fb8cd:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  vol1
root@4f0d8f7fb8cd:/# df -h
Filesystem                                       Size  Used Avail Use% Mounted on
overlay                                          7.8G  750M  6.6G  10% /
tmpfs                                            2.0G     0  2.0G   0% /dev
tmpfs                                            2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:1:0   93M  1.6M   85M   2% /vol1
/dev/root                                        7.8G  750M  6.6G  10% /etc/hosts
shm                                               64M     0   64M   0% /dev/shm
tmpfs                                            2.0G     0  2.0G   0% /sys/firmware
root@4f0d8f7fb8cd:/#
  1. Reset the VM
  2. After vm comes back up, ``docker volume inspect``` and admin cli volume ls still shows volume as attached.
root@photon-machine [ ~ ]# docker volume ls
DRIVER              VOLUME NAME
vsphere:latest      TestVolSuspend@sharedVmfs-0
vsphere:latest      VolZZZ@sharedVmfs-0
vsphere:latest      volABC@sharedVmfs-0
root@photon-machine [ ~ ]#
root@photon-machine [ ~ ]#
root@photon-machine [ ~ ]# docker volume inspect TestVolSuspend@sharedVmfs-0
[
    {
        "Driver": "vsphere:latest",
        "Labels": null,
        "Mountpoint": "/mnt/vmdk/TestVolSuspend@sharedVmfs-0",
        "Name": "TestVolSuspend@sharedVmfs-0",
        "Options": {},
        "Scope": "global",
        "Status": {
            "access": "read-write",
            "attach-as": "independent_persistent",
            "attached to VM": "photon-VM0.3",
            "attachedVMDevice": {
                "ControllerPciSlotNumber": "160",
                "Unit": "0"
            },
            "capacity": {
                "allocated": "15MB",
                "size": "100MB"
            },
            "clone-from": "None",
            "created": "Wed Jul 26 20:10:58 2017",
            "created by VM": "photon-VM0.3",
            "datastore": "sharedVmfs-0",
            "diskformat": "thin",
            "fstype": "ext4",
            "status": "attached"
        }
    }
]
root@photon-machine [ ~ ]#

[root@sc-rdops-vm01-dhcp-20-85:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py volume ls
Volume          Datastore     VMGroup   Capacity  Used  Filesystem  Policy  Disk Format  Attached-to   Access      Attach-as               Created By    Created Date
--------------  ------------  --------  --------  ----  ----------  ------  -----------  ------------  ----------  ----------------------  ------------  ------------------------
VolZZZ          sharedVmfs-0  _DEFAULT  100MB     0     N/A         N/A     thin         photon-VM2.3  read-write  independent_persistent  photon-VM2.3  Tue Jul 25 20:50:26 2017
TestVolSuspend  sharedVmfs-0  _DEFAULT  100MB     15MB  ext4        N/A     thin         photon-VM0.3  read-write  independent_persistent  photon-VM0.3  Wed Jul 26 20:10:58 2017
volABC          sharedVmfs-0  _DEFAULT  100MB     15MB  ext4        N/A     thin         photon-VM0.3  read-write  independent_persistent  photon-VM0.3  Wed Jul 26 21:26:05 2017

[root@sc-rdops-vm01-dhcp-20-85:~]

Logs:
docker-volume-vsphere.txt
vmdk_ops.txt


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4