From 9cf5dd0291e98a3307daf64e31f6e6fae8bdf391 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 2 Nov 2020 06:32:53 -0800 Subject: [PATCH] Use cgroup v1 in Fedora +31 (#6862) Fedora 31 uses Cgroups v2 by default. This change by passes the kernel parameter systemd.unified_cgroup_hierarchy=0. Signed-off-by: Victor Morales --- roles/container-engine/cri-o/tasks/main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/container-engine/cri-o/tasks/main.yaml b/roles/container-engine/cri-o/tasks/main.yaml index 61bea7af6..887d1cfd1 100644 --- a/roles/container-engine/cri-o/tasks/main.yaml +++ b/roles/container-engine/cri-o/tasks/main.yaml @@ -25,6 +25,20 @@ tags: - facts +- name: disable unified_cgroup_hierarchy in Fedora 31+ + command: grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" + when: + - ansible_distribution == "Fedora" + - (ansible_distribution_major_version | int) >= 31 + - ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] is not defined or ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] != '0' + +- name: reboot in Fedora 31+ + reboot: + when: + - ansible_distribution == "Fedora" + - (ansible_distribution_major_version | int) >= 31 + - ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] is not defined or ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] != '0' + - import_tasks: "crio_repo.yml" - import_tasks: "crictl.yml"