]> git.proxmox.com Git - pve-container.git/commitdiff
config: allow deleting cpuunits and cpulimit
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 9 Mar 2016 09:01:13 +0000 (10:01 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 9 Mar 2016 16:51:29 +0000 (17:51 +0100)
These were simply missing.

src/PVE/LXC/Config.pm

index 2f656e501eeaea2dd316634c83be85dca1de88ea..04ce9ef452f862f74434ff2f911b38070047692d 100644 (file)
@@ -732,6 +732,12 @@ sub update_pct_config {
                     $opt eq 'tty' || $opt eq 'console' || $opt eq 'cmode') {
                next if $hotplug_error->($opt);
                delete $conf->{$opt};
+           } elsif ($opt eq 'cpulimit') {
+               next if $hotplug_error->($opt); # FIXME: hotplug
+               delete $conf->{$opt};
+           } elsif ($opt eq 'cpuunits') {
+               PVE::LXC::write_cgroup_value("cpu", $vmid, "cpu.shares", $confdesc->{cpuunits}->{default});
+               delete $conf->{$opt};
            } elsif ($opt =~ m/^net(\d)$/) {
                delete $conf->{$opt};
                next if !$running;