[pve-devel] [PATCH container v8 1/4] fix #3711: warn about storage errors during mountpoint delete

Michael Köppl m.koeppl at proxmox.com
Thu Jun 26 18:06:19 CEST 2025


Errors during deletion of a mountpoint volume should not stop users from
destroying a container. Instead of failing, a warning is printed and the
destruction of the container continues.

Originally-by: Stefan Hrdlicka <s.hrdlicka at proxmox.com>
 [ MK: remove ignore-storage-errors param ]
Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
---
 src/PVE/LXC.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 02dd3164..dacd6cf0 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -970,7 +970,8 @@ sub destroy_lxc_container {
         return if $volids->{$volume};
         $volids->{$volume} = 1;
 
-        delete_mountpoint_volume($storage_cfg, $vmid, $volume);
+        eval { delete_mountpoint_volume($storage_cfg, $vmid, $volume); };
+        PVE::RESTEnvironment::log_warn("failed to delete mountpoint volume $volume: $@") if $@;
     };
     PVE::LXC::Config->foreach_volume_full($conf, { include_unused => 1 }, $remove_volume);
 
-- 
2.39.5





More information about the pve-devel mailing list