]> git.proxmox.com Git - pve-container.git/commitdiff
pct cpuset: use limiting cgroup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 20 Jul 2021 11:19:27 +0000 (13:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Jul 2021 11:21:25 +0000 (13:21 +0200)
this is what's actually applied to the container (although
the container may be imposing an even stricter limit, but
that's not what we want to see...)

also, the v2 cpuset list may be empty (and often is for
unprivileged+nesting containers), which currently fails to
parse

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/CLI/pct.pm

index 8c40bbeb5dcd3ef630aaf2cb2892ddedc6fd077e..23e8db051756363e3d23ffab6b2bd26508074136 100755 (executable)
@@ -711,9 +711,9 @@ __PACKAGE__->register_method ({
            my $cgroup = PVE::LXC::CGroup->new($vmid);
 
            my ($cpuset, $path);
-           if (defined($path = $cgroup->get_path('cpuset'))) {
+           if (defined($path = $cgroup->get_path('cpuset', 1))) {
                $cpuset = eval { PVE::CpuSet->new_from_path($path); };
-           } elsif (defined($path = $cgroup->get_path())) {
+           } elsif (defined($path = $cgroup->get_path(undef, 1))) {
                $cpuset = eval { PVE::CpuSet->new_from_path($path); };
            } else {
                # Container not running.