Skip to content

Commit

Permalink
Move next-devel to cgroupsv2 for new nodes
Browse files Browse the repository at this point in the history
All we need to do is to make the associated karg be specific to
`testing-devel` by uplisting it to `image.yaml`. Then `next-devel` will
naturally shed it when `image-base.yaml` gets synced over.

See: coreos/fedora-coreos-tracker#292
  • Loading branch information
jlebon authored and HuijingHei committed Oct 10, 2023
1 parent 6bcda1f commit 8ce8774
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
6 changes: 3 additions & 3 deletions image-base.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is shared by all streams. For a stream-specific change, use
# image.yaml instead.

# Target disk size in GB.
# Make it at least 10G because we want the rootfs to be at least 8G:
# https://github.com/coreos/fedora-coreos-tracker/issues/586
Expand All @@ -6,9 +9,6 @@ size: 10
extra-kargs:
# Disable SMT on systems vulnerable to MDS or any similar future issue.
- mitigations=auto,nosmt
# https://github.com/coreos/fedora-coreos-tracker/issues/292
# https://fedoraproject.org/wiki/Changes/CGroupsV2
- systemd.unified_cgroup_hierarchy=0

# Disable networking by default on firstboot. We can drop this once cosa stops
# defaulting to `ip=dhcp,dhcp6 rd.neednet=1` when it doesn't see this key.
Expand Down
5 changes: 5 additions & 0 deletions image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
# 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
23 changes: 23 additions & 0 deletions tests/kola/misc-ro
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,26 @@ if ! grep prjquota <<< "${rootflags}"; then
fatal "missing prjquota in root mount flags: ${rootflags}"
fi
ok "root mounted with prjquota"

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

0 comments on commit 8ce8774

Please sign in to comment.