cgroup: Imply systemd.unified_cgroup_hierarchy=1 on cgroup_no_v1=all
cgroup_no_v1=all doesn't make a whole lot of sense with legacy hierarchy (where we use v1 hierarchy for everything), or hybrid hierarchy (where we still use v1 hierarchy for resource control). Right now we have to tell people to add both cgroup_no_v1=all and systemd.unified_cgroup_hierarchy=1 to get the desired behaviour, however in reality it's hard to imagine any situation where someone passes cgroup_no_v1=all but *doesn't* want to use the unified cgroup hierarchy. Make it so that cgroup_no_v1=all produces intuitive behaviour in systemd by default, although it can still be disabled by passing systemd.unified_cgroup_hierarchy=0 explicitly.
This commit is contained in:
@@ -369,6 +369,17 @@ static void test_is_wanted(void) {
|
||||
"systemd.unified_cgroup_hierarchy=0 "
|
||||
"systemd.legacy_systemd_cgroup_controller=0", 1) >= 0);
|
||||
test_is_wanted_print(false);
|
||||
|
||||
/* cgroup_no_v1=all implies unified cgroup hierarchy, unless otherwise
|
||||
* explicitly specified. */
|
||||
assert_se(setenv("SYSTEMD_PROC_CMDLINE",
|
||||
"cgroup_no_v1=all", 1) >= 0);
|
||||
test_is_wanted_print(false);
|
||||
|
||||
assert_se(setenv("SYSTEMD_PROC_CMDLINE",
|
||||
"cgroup_no_v1=all "
|
||||
"systemd.unified_cgroup_hierarchy=0", 1) >= 0);
|
||||
test_is_wanted_print(false);
|
||||
}
|
||||
|
||||
static void test_cg_tests(void) {
|
||||
|
||||
Reference in New Issue
Block a user