[pve-devel] [PATCH container 1/3] post-stop-hook: unmount before deactivating storages

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Dec 12 11:36:03 CET 2019


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 src/lxc-pve-poststop-hook | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc-pve-poststop-hook b/src/lxc-pve-poststop-hook
index 438836c..2a83872 100755
--- a/src/lxc-pve-poststop-hook
+++ b/src/lxc-pve-poststop-hook
@@ -23,10 +23,10 @@ PVE::LXC::Tools::lxc_hook('post-stop', 'lxc', sub {
 
     my $storage_cfg = PVE::Storage::config();
 
-    PVE::LXC::vm_stop_cleanup($storage_cfg, $vmid, $conf);
-
     PVE::Tools::run_command(['umount', '--recursive', $vars->{ROOTFS_PATH}]);
 
+    PVE::LXC::vm_stop_cleanup($storage_cfg, $vmid, $conf);
+
     # Because netlink is not a reliable protocol it can happen that lxc's
     # link-deletion messages get lost (or end up being too early?)
     for my $k (keys %$conf) {
-- 
2.20.1




More information about the pve-devel mailing list