fix(postinst): handle cgroup switch on systems with /boot/cmdline.txt#398
fix(postinst): handle cgroup switch on systems with /boot/cmdline.txt#398matteocostantini wants to merge 1 commit intohome-assistant:mainfrom
Conversation
Added logic to manage the switch to cgroup v2 on systems using /boot/cmdline.txt. This update ensures compatibility by checking for the presence of "systemd.unified_cgroup_hierarchy=false" and updating it, aligning system requirements, and prompting a reboot as necessary. Improved warning message for better clarity when neither configuration file is found.
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
sairon
left a comment
There was a problem hiding this comment.
I think the goal of this code is to revert changes that were previously done by the Supervised installation, see b45f5cd. It never touched /boot/cmdline.txt. Otherwise, if the code should really handle removing this kernel option, more cases would need to be addressed - e.g. the option at the start of the file (currently it won't be replaced, because the sed replaces pattern starting with a space) or value 0 which is valid (and maybe even more common) way to disable an option.
|
@sairon i want to remove the cgroupv1 istrunction from my legacy cmdline path. i dont have /boot/firmware/cmdline.txt. I think is need to put the remove operation to switch to cgroupv2 , because i think anyone have my situation. I made this operation editing manually my legacy path cmdline file! |
|
As @sairon said, I think this PR is a bit out of scope given the fact that we never touched If you have any further questions please do not hesitate to @ mention me in your reply but for now I will be closing this |
Added logic to manage the switch to cgroup v2 on systems using /boot/cmdline.txt. This update ensures compatibility by checking for the presence of "systemd.unified_cgroup_hierarchy=false" and updating it, aligning system requirements, and prompting a reboot as necessary. Improved warning message for better clarity when neither configuration file is found.