Skip to content

Comments

add postinstall hook to stay on cgroupv1#13

Merged
jepio merged 8 commits intoflatcar-masterfrom
jepio/cgroupv2-migration-hook
Aug 11, 2021
Merged

add postinstall hook to stay on cgroupv1#13
jepio merged 8 commits intoflatcar-masterfrom
jepio/cgroupv2-migration-hook

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>
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>
jepio added 2 commits August 10, 2021 12:25
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

@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 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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants