Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

bump coreos-init and bootengine commit for cgroupv1-runtime-revert support #1666

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

jepio
Copy link
Contributor

@jepio jepio commented Feb 23, 2022

bump coreos-init and bootengine commit for cgroupv1-runtime-revert support

This introduces changes to bootengine and coreos-init to support dynamically switching back to legacy cgroups when the /etc/flatcar-cgroupv1 flag file is found. This is done by running a binary before sysroot init is started by the initramfs, right after switch-root. This binary unmounts any cgroups initramfs may have set up and overlays /proc/cmdline with the right kernel arguments to convince systemd to setup legacy cgroups.

Pulls in:

How to use

Build image and boot with the following ignition:

storage:
  files:
  - path: /etc/flatcar-cgroupv1
    mode: 0444

Testing done

Mantle test: flatcar/mantle#298.

CI started with newly added mantle test: http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/4935/cldsv/

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)

@jepio
Copy link
Contributor Author

jepio commented Feb 24, 2022

Test cl.cgroupv1 passed with this change.

@JAORMX
Copy link
Contributor

JAORMX commented Feb 24, 2022

Out of curiosity is Flatcar now using cgroups v2 by default?

@pothos
Copy link
Contributor

pothos commented Feb 24, 2022

Out of curiosity is Flatcar now using cgroups v2 by default?

Yes, for new installations, details here: https://www.flatcar.org/docs/latest/container-runtimes/switching-to-unified-cgroups/

…ange

This pulls in flatcar/bootengine#35 and
flatcar/init#62, which enable boot time switching
back to legacy cgroups by creating a flag files (/etc/flatcar-cgroupv1) from
ignition.
@jepio jepio force-pushed the jepio/runtime-revert-to-cgroupv1 branch from 1c4d76e to d22fb6b Compare March 1, 2022 08:14
@jepio
Copy link
Contributor Author

jepio commented Mar 1, 2022

I'll merge this, ok @pothos?

@pothos
Copy link
Contributor

pothos commented Mar 1, 2022

A changelog entry would be good when this PR gets cherry-picked it will also be taken

@jepio
Copy link
Contributor Author

jepio commented Mar 1, 2022

Added the changelog entry.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio jepio force-pushed the jepio/runtime-revert-to-cgroupv1 branch from 7369284 to 0a25892 Compare March 1, 2022 14:28
@jepio jepio merged commit d06d7b9 into main Mar 1, 2022
@jepio jepio deleted the jepio/runtime-revert-to-cgroupv1 branch March 1, 2022 14:43
jepio added a commit that referenced this pull request Mar 1, 2022
bump coreos-init and bootengine commit for cgroupv1-runtime-revert support
jepio added a commit that referenced this pull request Mar 1, 2022
bump coreos-init and bootengine commit for cgroupv1-runtime-revert support
jepio added a commit that referenced this pull request Mar 17, 2022
This pulls in the changes to bootengine and coreos-init to enable runtime
switching to cgroupv1.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@skshandilya
Copy link

have you guys thought of the long term effects of this, because we are now introducing two ways of updating the kernel command line, one via initramfs and the other old and proven method via bootloader. People are going to wonder where these kernel options came from in the future.

@jepio
Copy link
Contributor Author

jepio commented Mar 29, 2022

Yes, that is a concern we had when going down this road. We do prefer the proven bootloader method, but we heard from many users that they:

  • need cgroups v1
  • can't deal with the required reboot to apply the kernel command line settings

Did this change cause issues for you? Do you have any suggestions of how better to deal with this and the tradeoffs?

@pothos
Copy link
Contributor

pothos commented Mar 29, 2022

This is only meant for the first boot. The correct kernel parameters should still be set the old way for persistence.

@pothos
Copy link
Contributor

pothos commented Mar 29, 2022

@jepio Should we add logic to skip the bind-mounting if the parameters are already present?

@pothos
Copy link
Contributor

pothos commented Mar 29, 2022

Or is this already done through the /sys/fs/cgroup/cgroup.subtree_control check?
Edit: Yes.

@jepio
Copy link
Contributor Author

jepio commented Mar 29, 2022

Yes (it is skipped if cgroupv2 is not mounted via the cgroup.subtree_control check)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants