]> git.proxmox.com Git - qemu-server.git/commit - PVE/API2/Qemu.pm
fix bug #841: replace get_used_paths with is_volume_in_use
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 10 Dec 2015 11:07:39 +0000 (12:07 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 10 Dec 2015 11:13:12 +0000 (12:13 +0100)
commit77019edfe0c190c949cdc0b0e3b4ad2ca37313b3
tree41e5d2b159d75a7f1808a6db5b4f4ba4207222c3
parentb944d5edbb3042f0450c21495263bc48e1013d38
fix bug #841: replace get_used_paths with is_volume_in_use

get_used_paths returned a hash of used paths for all the
volumes in a VM's config, which is not enough to figure out
whether there are snapshots, as snapshots often have
different paths.  Eg. on ZFS it is not enough to check for
/dev/zvol/tank/vm-123-disk-1 because the snapshot's path is
/dev/zvol/tank/vm-123-disk-1@snap1 and thus we allowed
deleting the drive. Then when trying to delete the snapshot
later you get:
  zfs error: cannot open 'tank/vm-751-disk-1': dataset does not exist
and it refuses to delete the snapshot.

Since its only use was to check whether or not a drive is
still in use it is now renamed to is_volume_in_use and
beside checking paths now also checks volume-ids as those
should stay the same.
PVE/API2/Qemu.pm
PVE/QemuServer.pm
changelog.Debian