]> git.proxmox.com Git - pve-container.git/commitdiff
Revert "apply pending changes in lxc prestart hook"
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 21 Nov 2019 08:03:44 +0000 (09:03 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 21 Nov 2019 08:05:44 +0000 (09:05 +0100)
This reverts commit 5a98fd2b573e96e1af37402211ba2a07abb489ca.

The prestart hook is executed by lxc, that is *after* it
loaded the config, so any pending changes which involve
updates to /var/lib/lxc/$vmid/config won't have any actual
effect: seccomp profile, apparmor profile changes, cgroup
related settings, newly added network devices, ...

src/lxc-pve-prestart-hook

index ee4f7e2e5a717ec1e1a1df4c2d539045ac7c89b1..229af8eddc95247fade145d16c8431e2fc431679 100755 (executable)
@@ -30,18 +30,11 @@ PVE::LXC::Tools::lxc_hook('pre-start', 'lxc', sub {
     return undef if ! -f PVE::LXC::Config->config_file($vmid);
 
     my $conf = PVE::LXC::Config->load_config($vmid);
-    my $storage_cfg = PVE::Storage::config();
-
-    # apply pending changes if present
-    if ($conf->{pending}) {
-       PVE::LXC::Config->vmconfig_apply_pending($vmid, $conf, $storage_cfg);
-       $conf = PVE::LXC::Config->load_config($vmid); # just to be sure
-    }
-
     if (!$skiplock && !PVE::LXC::Config->has_lock($conf, 'mounted')) {
        PVE::LXC::Config->check_lock($conf);
     }
 
+    my $storage_cfg = PVE::Storage::config();
 
     my $vollist = PVE::LXC::Config->get_vm_volumes($conf);
     my $loopdevlist = PVE::LXC::Config->get_vm_volumes($conf, 'rootfs');