public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] pvestatd: fix container cpuset scheduling
Date: Thu,  3 Dec 2020 16:01:40 +0100	[thread overview]
Message-ID: <20201203150140.15040-1-d.csapak@proxmox.com> (raw)

Since pve-container commit

c48a25452dccca37b3915e49b7618f6880aeafb1

the code to get the cpuset controller path lives in pve-commons PVE::CGroup.
Use that and improve the logging in case some error happens in the future.
Such an error will only be logged once per pvestatd run,
so it does not spam the log.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/Service/pvestatd.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 5e533ca3..7193388c 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -20,7 +20,7 @@ use PVE::Storage;
 use PVE::QemuServer;
 use PVE::QemuServer::Monitor;
 use PVE::LXC;
-use PVE::LXC::CGroup;
+use PVE::CGroup;
 use PVE::LXC::Config;
 use PVE::RPCEnvironment;
 use PVE::API2::Subscription;
@@ -257,7 +257,11 @@ my $NO_REBALANCE;
 sub rebalance_lxc_containers {
     # Make sure we can find the cpuset controller path:
     return if $NO_REBALANCE;
-    my $cpuset_base = eval { PVE::LXC::CGroup::cpuset_controller_path() };
+    my $cpuset_base = eval { PVE::CGroup::cpuset_controller_path() };
+    if (my $err = $@) {
+	syslog('info', "could not get cpuset controller path: $err");
+    }
+
     if (!defined($cpuset_base)) {
 	$NO_REBALANCE = 1;
 	return;
-- 
2.20.1





             reply	other threads:[~2020-12-03 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 15:01 Dominik Csapak [this message]
2020-12-03 15:35 ` Aaron Lauterer
2020-12-03 15:38   ` Thomas Lamprecht
2020-12-03 15:37 ` [pve-devel] applied: " 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=20201203150140.15040-1-d.csapak@proxmox.com \
    --to=d.csapak@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