On 11/22/19 12:32 PM, Oguz Bektas wrote:
> hi,
> 
> On Fri, Nov 22, 2019 at 09:18:34AM +0100, Thomas Lamprecht wrote:
>> 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 $@;
> 
> that shouldn't happen i think.
> 
> vmconfig_apply_pending's default behaviour is not to die and just log the
> errors. so with an un-appliable pending change the task isn't aborted.
> 
> is there a case where it actually aborts the reboot?
> 

no idea, but better safe than sorry.

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to