From 7e4e69a6d2ad7dd96fc31af92f298309fd854f5c Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 29 May 2012 07:56:16 +0200 Subject: [PATCH] die if vdisk_free fail on delete_drive replace the warn by a die. Currently, if we vdisk_free a disk and something goes wrong (network storage problem by example), the drive is removed from config and we cannot retry to remove it later. Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 3895b189..fb4b2804 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -599,7 +599,7 @@ my $delete_drive = sub { if (&$vm_is_volid_owner($storecfg, $vmid, $volid)) { if ($force || $key =~ m/^unused/) { eval { PVE::Storage::vdisk_free($storecfg, $volid); }; - warn $@ if $@; + die $@ if $@; } else { PVE::QemuServer::add_unused_volume($conf, $volid, $vmid); }