[pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Jul 20 13:19:27 CEST 2021
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 at proxmox.com>
---
src/PVE/CLI/pct.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
index 8c40bbe..23e8db0 100755
--- a/src/PVE/CLI/pct.pm
+++ b/src/PVE/CLI/pct.pm
@@ -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.
--
2.30.2
More information about the pve-devel
mailing list