]> git.proxmox.com Git - pve-storage.git/commitdiff
esxi: clean-up state-dir in deactivate storage
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 12 Mar 2024 17:33:15 +0000 (18:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Mar 2024 14:29:35 +0000 (15:29 +0100)
to ensure we always query a new one on quick add-delete-add cycles.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Storage/ESXiPlugin.pm

index c4795c4c48f8b35f62e71f3db6ff01e08b3ffa38..72776e81b821e73677a56155b96de6b3be6a024a 100644 (file)
@@ -346,6 +346,10 @@ sub deactivate_storage {
     my ($class, $storeid, $scfg, $cache) = @_;
 
     $class->esxi_unmount($storeid, $scfg);
+
+    my $rundir = run_path($storeid);
+    remove_tree($rundir); # best-effort, ignore errors for now
+
 }
 
 sub activate_volume {