[pve-devel] [PATCH container] apply pending changes in lxc poststop hook
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Nov 22 09:18:34 CET 2019
On 11/21/19 5:48 PM, Oguz Bektas wrote:
> diff --git a/src/lxc-pve-poststop-hook b/src/lxc-pve-poststop-hook
> index 19d0b52..64fe54d 100755
> --- a/src/lxc-pve-poststop-hook
> +++ b/src/lxc-pve-poststop-hook
> @@ -38,6 +38,14 @@ PVE::LXC::Tools::lxc_hook('post-stop', 'lxc', sub {
> PVE::Network::veth_delete("veth${vmid}i$ind");
> }
>
> + my $config_updated = 0;
> + if ($conf->{pending}) {
> + PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storage_cfg);
we may want to eval this statement, and just warn the errors it throws,
It may error but that should _not_ abort a reboot, config re-generation
can be done nonetheless, so just above would be enough to wrap:
eval { PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storage_cfg) };
warn "$@" if $@;
More information about the pve-devel
mailing list