all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup
@ 2021-07-20 11:19 Wolfgang Bumiller
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfgang Bumiller @ 2021-07-20 11:19 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH container 2/2] pct cpuset: show effective values
  2021-07-20 11:19 [pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup Wolfgang Bumiller
@ 2021-07-20 11:19 ` Wolfgang Bumiller
  2021-07-20 11:24 ` [pve-devel] applied-series: [PATCH container 1/2] pct cpuset: use limiting cgroup Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Bumiller @ 2021-07-20 11:19 UTC (permalink / raw)
  To: pve-devel

rather than the "desired" ones, this is more useful
(we could also show differences if there are any?)

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 23e8db0..254b3b3 100755
--- a/src/PVE/CLI/pct.pm
+++ b/src/PVE/CLI/pct.pm
@@ -712,9 +712,9 @@ __PACKAGE__->register_method ({
 
 	    my ($cpuset, $path);
 	    if (defined($path = $cgroup->get_path('cpuset', 1))) {
-		$cpuset = eval { PVE::CpuSet->new_from_path($path); };
+		$cpuset = eval { PVE::CpuSet->new_from_path($path, 1); };
 	    } elsif (defined($path = $cgroup->get_path(undef, 1))) {
-		$cpuset = eval { PVE::CpuSet->new_from_path($path); };
+		$cpuset = eval { PVE::CpuSet->new_from_path($path, 1); };
 	    } else {
 		# Container not running.
 		next;
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied-series: [PATCH container 1/2] pct cpuset: use limiting cgroup
  2021-07-20 11:19 [pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup Wolfgang Bumiller
  2021-07-20 11:19 ` [pve-devel] [PATCH container 2/2] pct cpuset: show effective values Wolfgang Bumiller
@ 2021-07-20 11:24 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2021-07-20 11:24 UTC (permalink / raw)
  To: Proxmox VE development discussion, Wolfgang Bumiller

On 20.07.21 13:19, Wolfgang Bumiller wrote:
> 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(-)
> 
>

applied both patches, thanks!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-20 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 11:19 [pve-devel] [PATCH container 1/2] pct cpuset: use limiting cgroup Wolfgang Bumiller
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal