From ea2884f04dd2af4a4e4c0a772c857912413ae84d Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 1 Apr 2020 12:20:58 +0200 Subject: [PATCH] cpuset: allow empty cpusets This is explicitly allowed in the documentation and happens easily with cgroupv2 as there it is used to inherit from the closest ancestor. Signed-off-by: Wolfgang Bumiller --- src/PVE/CpuSet.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/PVE/CpuSet.pm b/src/PVE/CpuSet.pm index 297e995..a16f7ee 100644 --- a/src/PVE/CpuSet.pm +++ b/src/PVE/CpuSet.pm @@ -40,9 +40,6 @@ sub new_from_path { my ($count, $members) = parse_cpuset($set_text); - die "got empty cpuset for cgroup '$path'\n" - if !$count; - return $class->new($members); } @@ -81,8 +78,6 @@ sub write_to_cgroup { $value .= $cpuid; } - die "unable to write empty cpu set\n" if !length($value); - open(my $fh, '>', $filename) || die "failed to open '$filename' - $!\n"; PVE::Tools::safe_print($filename, $fh, "$value\n"); close($fh) || die "failed to close '$filename' - $!\n"; -- 2.39.2