[pve-devel] [PATCH storage] rbd plugin: free image: use actual command in error message

Fabian Ebner f.ebner at proxmox.com
Wed Oct 27 14:46:20 CEST 2021


For linked clones, the base name was included, which is confusing.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/Storage/RBDPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 4bd43d5..613d32b 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -540,10 +540,10 @@ sub free_image {
     $class->deactivate_volume($storeid, $scfg, $volname);
 
     my $cmd = $rbd_cmd->($scfg, $storeid, 'snap', 'purge',  $name);
-    run_rbd_command($cmd, errmsg => "rbd snap purge '$volname' error");
+    run_rbd_command($cmd, errmsg => "rbd snap purge '$name' error");
 
     $cmd = $rbd_cmd->($scfg, $storeid, 'rm', $name);
-    run_rbd_command($cmd, errmsg => "rbd rm '$volname' error");
+    run_rbd_command($cmd, errmsg => "rbd rm '$name' error");
 
     return undef;
 }
-- 
2.30.2






More information about the pve-devel mailing list