Docker executor jobs failing on CircleCI Server 4 during environment spin up step

Overview

When running Docker Executor jobs on Server 4, you may see them fail on the 'Spin up environment' step with the error containing the following message:

"cgroup doesn't match target mode"

Solution

The issue is caused b the Nomad client attempting to use cgroup v2 for memory usage control when running the Docker executor on Ubuntu 22, natively supports only v1 out of the box.

To resolve the issue, do the following to revert to cgroup v1:

  • Within /etc/default/grub, modify the GRUB_CMDLINE_LINUX value such that it reads as follows:
    • GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
  •  Save the file and then run the following command:

    • sudo update-grub
  • Reboot the VMs upon which the Nomad client is installed and retry the job.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.