We're already limiting CPUs to lxc/cpuset.effective_cpus, so let's use the highest cpuid from that set as a maximum to initialize the container count array. --- PVE/Service/pvestatd.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm index 361c518e..4b8e33d5 100755 --- a/PVE/Service/pvestatd.pm +++ b/PVE/Service/pvestatd.pm @@ -235,7 +235,7 @@ sub rebalance_lxc_containers { my $all_cpus = PVE::CpuSet->new_from_cgroup('lxc', 'effective_cpus'); my @allowed_cpus = $all_cpus->members(); my $cpucount = scalar(@allowed_cpus); - my $max_cpuid = PVE::CpuSet::max_cpuid(); + my $max_cpuid = $allowed_cpus[-1]+1; my @cpu_ctcount = (0) x $max_cpuid; my @balanced_cts; -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel