Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

"docker volume inspect" does not show the current VM name of the VM that created it #652

Closed
SandeepPissay opened this issue Oct 26, 2016 · 3 comments
Assignees

Comments

@SandeepPissay
Copy link

Steps:

  1. Create a docker volume
  2. run "docker volume inspect", this shows the "created by VM" correctly as below

root@photon-I1RJXlgPS [ ~ ]# docker volume inspect MyVolume
[
{
"Name": "MyVolume",
"Driver": "vmdk",
"Mountpoint": "/mnt/vmdk/MyVolume",
"Status": {
"access": "read-write",
"attach-as": "independent_persistent",
"attached to VM": "photon-2",
"capacity": {
"allocated": "54MB",
"size": "1GB"
},
"created": "Wed Oct 26 23:26:21 2016",
"created by VM": "photon-1",
"datastore": "datastore1",
"diskformat": "thin",
"fstype": "ext4",
"status": "attached"
},
"Labels": {},
"Scope": "global"
}
]

  1. Rename the VM from which the volume was created to something other than "photon-1".
  2. "docker volume inspect" shows the old VM name.
    root@photon-I1RJXlgPS [ ~ ]# docker volume inspect MyVolume
    [
    {
    "Name": "MyVolume",
    "Driver": "vmdk",
    "Mountpoint": "/mnt/vmdk/MyVolume",
    "Status": {
    "access": "read-write",
    "attach-as": "independent_persistent",
    "attached to VM": "photon-2",
    "capacity": {
    "allocated": "54MB",
    "size": "1GB"
    },
    "created": "Wed Oct 26 23:26:21 2016",
    "created by VM": "photon-1",
    "datastore": "datastore1",
    "diskformat": "thin",
    "fstype": "ext4",
    "status": "attached"
    },
    "Labels": {},
    "Scope": "global"
    }
    ]
@govint
Copy link
Contributor

govint commented Oct 27, 2016

Good, the server plugin must figure the name of the VM from its UUID (persist the UUID in the KV instead of name) and pass that on a Get request.

@govint
Copy link
Contributor

govint commented Nov 9, 2016

Fixing this for how the attached to VM is shown. Its possible that the VM that created a volume doesn't exist any longer but the current attached to VM is perhaps more interesting to a user - especially if a volume is unusable for some reason and showing up as attached, then at least its good to show the current name of the VM thats attached the volume. the VM that created the volume may not be as interesting. Possibly a "last attached" VM name would also help. Disk goes corrupt (app is unable to use the disk) at the least we can figure which VM used it last. Not this issue may be.

@govint
Copy link
Contributor

govint commented Nov 15, 2016

Closed via #722

@govint govint closed this as completed Nov 15, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants