public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup
Date: Tue, 20 Jul 2021 13:19:27 +0200	[thread overview]
Message-ID: <20210720111928.79632-1-w.bumiller@proxmox.com> (raw)

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 | 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





             reply	other threads:[~2021-07-20 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 11:19 Wolfgang Bumiller [this message]
2021-07-20 11:19 ` [pve-devel] [PATCH container 2/2] pct cpuset: show effective values Wolfgang Bumiller
2021-07-20 11:24 ` [pve-devel] applied-series: [PATCH container 1/2] pct cpuset: use limiting cgroup Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210720111928.79632-1-w.bumiller@proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal