Skip to content

Commit

Permalink
Force CgroupsV1 on Ubuntu
Browse files Browse the repository at this point in the history
PR #115 removed a force-cgroups-v2 setup for Ubuntu, possibly
assuming that Ubuntu uses cgroups v1 by default? That doesn't
seem to be the case: the Ubuntu I've looked at (via Cirrus
rerun-with-terminal) seems to default to v2. End result is
that we've been running CI for months without testing runc.
This PR forces cgroups v1 on Ubuntu, via grub boot args.

Also, remove a confusing "--exclude netavark et al". Again
in PR #115 the "TODO: remove this" comment was removed but
the actual code was not. I believe that was an oversight.

Both of these are completely untested. This PR is the test.

Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Jul 6, 2022
1 parent 66fc344 commit f869817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cache_images/fedora-netavark_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ INSTALL_PACKAGES=(\
zip
)

EXARG="--exclude=netavark --exclude=aardvark-dns --exclude=cargo --exclude=rust"

msg "Installing general build/test dependencies"
bigto $SUDO dnf install -y $EXARG "${INSTALL_PACKAGES[@]}"
bigto $SUDO dnf install -y "${INSTALL_PACKAGES[@]}"

# It was observed in F33, dnf install doesn't always get you the latest/greatest
lilto $SUDO dnf update -y
Expand Down
3 changes: 2 additions & 1 deletion cache_images/ubuntu_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ 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 "Forcing CgroupsV1"
SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0"/'
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 f869817

Please sign in to comment.