[pve-devel] [PATCH container 9/9] apply pending changes when container is started
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Sep 11 09:40:37 CEST 2019
On September 5, 2019 4:11 pm, Oguz Bektas wrote:
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
> src/PVE/LXC.pm | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 475d9be..9dd5bc9 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1939,6 +1939,13 @@ sub vm_start {
> close($fh);
> }
>
> + # apply pending changes while starting
> + my $storecfg = PVE::Storage::config();
> + if (scalar(keys %{$conf->{pending}})) {
> + PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storecfg);
> + $conf = PVE::LXC::Config->load_config($vmid); # update/reload
> + }
> +
this should probably happen before the call to update_lxc_config a few
lines above..
> my $cmd = ['systemctl', 'start', "pve-container\@$vmid"];
>
> PVE::GuestHelpers::exec_hookscript($conf, $vmid, 'pre-start', 1);
> --
> 2.20.1
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
More information about the pve-devel
mailing list