Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add postinstall hook to stay on cgroupv1 #13

Merged
merged 8 commits into from
Aug 11, 2021

Conversation

jepio
Copy link
Member

@jepio jepio commented Aug 2, 2021

add postinstall hook to stay on cgroupv1

Changing cgroup setting on a provisioned system is guaranteed to cause trouble with kuberntes clusters. In order to not disturb operations during a routing update, a postinstall hook is added that modifies the OEM grub.cfg to keep the system on cgroupv1. This will allow us to migrate the alpha channel to cgroupv2.

Part of flatcar-archive/coreos-overlay#931

How to use

Boot alpha 2942.0.0.
Use flatcar/Flatcar#70 (comment) to update to a development snapshot containing this change.

In a coming release we will enable cgroupv2 by default in systemd. We are
trying to not break existing kubernetes deployments, which can't handle this
kind of change without intervention, so the postinstall hook will add the
'systemd.cgroup_unified_hierarchy' to the kernel command line to keep older
nodes on cgroupv1.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio jepio requested a review from a team August 2, 2021 15:06
jepio added a commit to flatcar-archive/coreos-overlay that referenced this pull request Aug 2, 2021
This pulls in flatcar/update_engine#13

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
flatcar-postinst Outdated Show resolved Hide resolved
flatcar-postinst Outdated Show resolved Hide resolved
jepio and others added 4 commits August 6, 2021 15:59
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Tell users to remove if they don't need it.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
The cgroup migration is not needed on nightly builds because they are should test the latest code and are normally not updated by update_engine anyway.

Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
jepio added a commit to flatcar-archive/coreos-overlay that referenced this pull request Aug 6, 2021
This pulls in flatcar/update_engine#13

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
jepio added a commit to flatcar-archive/coreos-overlay that referenced this pull request Aug 6, 2021
This pulls in flatcar/update_engine#13

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
We are changing the 'SystemdCgroup' setting of containerd to true in the
config.toml file, but have kept the previous configuration with the name
config-cgroupfs.toml. When we upgrade, we can drop a systemd unit that
will move to the frozen configuration.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
…ybrid hierarchy

Seems that systemd.unified_cgroup_hierarchy alone is not enough to avoid
cgroup2, one also needs to pass another parameter to avoid the hybrid
hierarchy.

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

jepio commented Aug 10, 2021

@pothos could you take a look at the last two commits:

  • added the container config freezing
  • needed another additional kernel parameter, otherwise systemd mounts a hybrid hierarchy

flatcar-postinst Outdated Show resolved Hide resolved
flatcar-postinst Outdated Show resolved Hide resolved
@jepio jepio merged commit 858f3a5 into flatcar-master Aug 11, 2021
@jepio jepio deleted the jepio/cgroupv2-migration-hook branch August 11, 2021 13:10
jepio added a commit to flatcar-archive/coreos-overlay that referenced this pull request Aug 12, 2021
This pulls in flatcar/update_engine#13

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@t-lo t-lo added this to Ready to Release - 2022-02-28 in Flatcar Container Linux Releases Planning Mar 4, 2022
t-lo pushed a commit to flatcar/scripts that referenced this pull request Apr 17, 2023
This pulls in flatcar/update_engine#13

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Flatcar Container Linux Releases Plan...
Ready to Release - 2022-02-28
2 participants