[pve-devel] [PATCH v2 container 14/18] apply pending changes during container start
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Oct 2 12:35:50 CEST 2019
On 9/30/19 2:44 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..65c41f5 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1930,6 +1930,13 @@ sub userns_command {
> sub vm_start {
> my ($vmid, $conf, $skiplock) = @_;
>
> + # apply pending changes while starting
> + my $storecfg = PVE::Storage::config();
only get $storecfg if required, i.e., in the if branch?
> + if (scalar(keys %{$conf->{pending}})) {
> + PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storecfg);
> + $conf = PVE::LXC::Config->load_config($vmid); # update/reload
> + }
> +
> update_lxc_config($vmid, $conf);
>
> my $skiplock_flag_fn = "/run/lxc/skiplock-$vmid";
>
More information about the pve-devel
mailing list