[pve-devel] [PATCH container v7 1/4] fix #3711: warn about storage errors during mountpoint delete
Michael Köppl
m.koeppl at proxmox.com
Tue May 27 18:01:33 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 2b9f0cf..20ff54e 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -953,7 +953,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