open-nomad/client/lib/cgutil
Seth Hoenig cade04d3f6 client: change test to not poke cgroupv2 edge case
This PR tweaks the TestCpusetManager_AddAlloc unit test to not break
when being run on a machine using cgroupsv2. The behavior of writing
an empty cpuset.cpu changes in cgroupv2, where such a group now inherits
the value of its parent group, rather than remaining empty.

The test in question was written such that a task would consume all available
cores shared on an alloc, causing the empty set to be written to the shared
group, which works fine on cgroupsv1 but breaks on cgroupsv2. By adjusting
the test to consume only 1 core instead of all cores, it no longer triggers
that edge case.

The actual fix for the new cgroupsv2 behavior will be in #11933
2022-01-27 08:27:40 -06:00
..
cgutil_default.go gofmt all the files 2021-10-01 10:14:28 -04:00
cgutil_linux.go cgutil: implement cpuset management as seperate package 2021-04-13 13:28:36 -04:00
cpuset_manager.go testing fixes 2021-04-14 10:17:28 -04:00
cpuset_manager_default.go gofmt all the files 2021-10-01 10:14:28 -04:00
cpuset_manager_linux.go nit: code cleanup/organization 2021-04-16 15:14:29 -04:00
cpuset_manager_linux_test.go client: change test to not poke cgroupv2 edge case 2022-01-27 08:27:40 -06:00