]> git.proxmox.com Git - pve-container.git/commitdiff
stop/reboot: handle pending changes errors as non-fatal
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 22 Nov 2019 08:50:52 +0000 (09:50 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 22 Nov 2019 08:50:54 +0000 (09:50 +0100)
Note them in the log, but do not die - the pending changes should be
kept if the did not apply and we do not want to cancel a reboot.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/lxc-pve-poststop-hook

index 64fe54d9dbbed38ba97cd5e5ef8df8b5d5e411a6..438836c0672f3080fc27ae06ebb613922051f8ec 100755 (executable)
@@ -40,7 +40,8 @@ PVE::LXC::Tools::lxc_hook('post-stop', 'lxc', sub {
 
     my $config_updated = 0;
     if ($conf->{pending}) {
-       PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storage_cfg);
+       eval { PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storage_cfg) };
+       warn "$@" if $@;
        PVE::LXC::update_lxc_config($vmid, $conf);
        $config_updated = 1;
     }