Skip to content

Commit

Permalink
move to cgroups v2 everywhere
Browse files Browse the repository at this point in the history
Adjust the kernel arguments so that we're now using cgroups v2
in our testing-devel (and subsequently, testing and stable) stream(s).

Context: coreos/fedora-coreos-tracker#292
  • Loading branch information
dustymabe committed May 25, 2021
1 parent a70a9ee commit 11a3801
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
5 changes: 0 additions & 5 deletions image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@
# similarly to manifest.yaml. Unlike image-base.yaml, which is shared by all
# streams.
include: image-base.yaml

extra-kargs:
# https://github.com/coreos/fedora-coreos-tracker/issues/292
# https://fedoraproject.org/wiki/Changes/CGroupsV2
- systemd.unified_cgroup_hierarchy=0
25 changes: 7 additions & 18 deletions tests/kola/misc-ro
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,14 @@ if ! grep prjquota <<< "${rootflags}"; then
fi
ok "root mounted with prjquota"

# make sure the system is on cgroups v2
has_cgroup_karg=1
grep -q systemd.unified_cgroup_hierarchy /proc/cmdline || has_cgroup_karg=0
sys_fs_cgroup_source=$(findmnt -no SOURCE /sys/fs/cgroup)
stream=$(rpm-ostree status -b --json | jq -r '.deployments[0]["base-commit-meta"]["fedora-coreos.stream"]')
case "$stream" in
"testing-devel" | "testing" | "stable")
if [ $has_cgroup_karg == 0 ]; then
fatal "missing systemd.unified_cgroup_hierarchy=0"
fi
if [[ $sys_fs_cgroup_source != tmpfs ]]; then
fatal "/sys/fs/cgroup is not tmpfs"
fi
;;
*)
if [ $has_cgroup_karg == 1 ]; then
fatal "found systemd.unified_cgroup_hierarchy=0"
fi
if [[ $sys_fs_cgroup_source != cgroup2 ]]; then
fatal "/sys/fs/cgroup is not cgroup2"
fi
;;
esac
if [ $has_cgroup_karg == 1 ]; then
fatal "found systemd.unified_cgroup_hierarchy=0"
fi
if [[ $sys_fs_cgroup_source != cgroup2 ]]; then
fatal "/sys/fs/cgroup is not cgroup2"
fi

0 comments on commit 11a3801

Please sign in to comment.