Skip to content

Commit

Permalink
Drop Fedora 35 runc/CGroupsV1, enable in Ubuntu
Browse files Browse the repository at this point in the history
Prior to this commit, Ubuntu VMs were setup with CGroupsV2 enabled.
This supported (especially) podman testing to occur with `crun` instead of
`runc` + CgroupsV1 which is the default.  The opposite was then done for
the Fedora N-1 (aka 'prior') VMs, CGroupsV1 was enabled + `runc`.

With the change in F36 to a netavark/aardvark-dns network stack from
CNI, testing matrices will become additionally complicated if this
regime was maintained.  Simplify the landscape by reverting the Ubuntu VM
setup back to it's default of CGV1 + `runc`.  At the same time, restore
Fedora 35 to it's default of CGV2 + `crun` (along with Fedora 36).

In other words, coverage will apply according to distribution defaults:

* Latest Ubuntu: Use CGV1 + `runc` + CNI
* Prior Fedora: Use CGV2 + `crun` + CNI
* Latest Fedora: Use CGV2 + `crun` + netavark/aardvark-dns

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Mar 23, 2022
1 parent 752b774 commit b301a32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
13 changes: 0 additions & 13 deletions cache_images/fedora_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ if ! ((CONTAINER)); then
msg "Enabling cgroup management from containers"
ooe.sh $SUDO setsebool -P container_manage_cgroup true
fi

if [[ "$PACKER_BUILD_NAME" =~ prior ]]; then
warn "Disabling CgroupsV2 kernel command-line option for systemd"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 systemd.unified_cgroup_hierarchy=0"/'
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub
# This is always a symlink to the correct location under /boot/...
ooe.sh $SUDO grub2-mkconfig -o $($SUDO realpath --physical /etc/grub2.cfg)
# This is needed to update the /boot/loader/entries/... file to match grub
# config (bug?). Discovered Jul 28, 2021 on newly build F33 images. Never
# a problem before this point :(
ooe.sh $SUDO grubby --grub2 --update-kernel=$($SUDO grubby --default-kernel) \
--args="systemd.unified_cgroup_hierarchy=0"
fi
fi

nm_ignore_cni
Expand Down
5 changes: 1 addition & 4 deletions cache_images/ubuntu_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ bash $SCRIPT_DIRPATH/ubuntu_packaging.sh

if ! ((CONTAINER)); then
warn "Making Ubuntu kernel to enable cgroup swap accounting"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1'
warn "Enabling CgroupsV2 kernel command-line option for systemd"
SEDCMD="$SEDCMD systemd.unified_cgroup_hierarchy=1"
SEDCMD="$SEDCMD\"/"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1/'
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub.d/*
ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub
ooe.sh $SUDO update-grub
Expand Down

0 comments on commit b301a32

Please sign in to comment.