Question about cgroups v2

Kubernetes v1.19 will become GA soon with support of cgroups v2. Now FCOS disabled cgroups v2 with cmdline but will you make cgroups v2 default immediately after kubernetes v1.19 release? (Or make this an ignition option?)

There is currently a discussion about this topic in the fedora-coreos-tracker. I think the current plan is to make it easy to set cgroups v2 via Ignition.

If you can’t wait for this change to hit in FCOS you can enable cgroups v2 (not hybrid cgroups v1/v2) with this ignition block:

systemd:
  units:
  - name: enable-cgroups-v2.service
    enabled: true
    contents: |
      [Unit]
      Description=Enable cgroups v2 (systemd.unified_cgroup_hierarchy)
      ConditionFirstBoot=true
      After=ignition-complete.target
      Before=default.target

      [Service]
      Type=oneshot
      ExecStart=/usr/bin/rpm-ostree kargs --replace systemd.unified_cgroup_hierarchy=1 --reboot

      [Install]
      WantedBy=basic.target

Note: Once this unit starts it will reboot your node ASAP on the first boot.

1 Like