[pve-devel] [PATCH qemu-server] api/move_disk: log deletion of source volume

Dominik Csapak d.csapak at proxmox.com
Mon Oct 18 10:24:37 CEST 2021


This way the user always sees that the source was deleted, even
if the storage plugin does not log anything (not every storage plugin
does).

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/API2/Qemu.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index cc2a543..d457421 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3446,9 +3446,11 @@ __PACKAGE__->register_method({
                 }
 
 		if ($param->{delete}) {
+		    warn "removing source volume '$old_volid'\n";
 		    eval {
 			PVE::Storage::deactivate_volumes($storecfg, [$old_volid]);
 			PVE::Storage::vdisk_free($storecfg, $old_volid);
+			warn "source volume successfully removed\n";
 		    };
 		    warn $@ if $@;
 		}
-- 
2.30.2






More information about the pve-devel mailing list