]> git.proxmox.com Git - qemu-server.git/commit
drive: volume in-use check: fix fallback path comparison
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 15 Apr 2021 10:10:57 +0000 (12:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 18 Apr 2021 15:26:05 +0000 (17:26 +0200)
commita0d8d8592aae4c3a20155f1504a194bff8f95061
tree1347d71f5adba5694dcde63fcfb414d48297d61f
parent04fac98accbab60ffb5b043d6fccc9a911f62df9
drive: volume in-use check: fix fallback path comparison

When checking whether a volume is still referenced by a snapshot, the volid
itself is first checked. When the volid is different, we fall back to comparing
the path.

As the first value to be compared is a volume's path, the second value better be
a volume's path too, and not a snapshot's path.

See also 77019edfe0c190c949cdc0b0e3b4ad2ca37313b3 for historical context.

The error that led me here:
* had a VM with ZFS over iSCSI storage with an exsiting snapshot
* add new unused drive
* try to remove the unsued drive
* fails, because ZFS (not Pool!) Plugin does not support snapshot paths.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuServer/Drive.pm