Applied with counts fixed up: my $max_cpuid = $allowed_cpus[-1]; # removed +1 here my @cpu_ctcount = (0) x ($max_cpuid+1); # added it here
On Thu, Apr 20, 2017 at 10:50:51AM +0200, Wolfgang Bumiller wrote: > 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