]> git.proxmox.com Git - pve-manager.git/commitdiff
pvestatd: fix container cpuset scheduling
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 3 Dec 2020 15:01:40 +0000 (16:01 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 3 Dec 2020 15:33:50 +0000 (16:33 +0100)
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

index 5e533ca3a3757153532f689b937ba1c660a41573..7193388cc2c1cb577dbb7895e9b6fa9bd32a85fb 100755 (executable)
@@ -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;