initrd: Mount cgroup2 filesystem for Podman 6+ compatibility - #5
Conversation
Assisted-by: OpenCode (Claude Opus 4)
a3f6bbe to
800b328
Compare
achilleas-k
left a comment
There was a problem hiding this comment.
Thank you. This LGTM but the new test is failing.
|
hmm the target path |
5b33c14 to
f2b9542
Compare
|
@achilleas-k it's working fine now with last changes. I didn't hit the CI issue because I did my test locally with osbuild/osbuild#2503 which ensures |
|
I think the readme should also have info about this added to it. Also, will this work correctly on systems that still use cgroups1 and older podman versions? Or is that something we don't care about at this point? |
f2b9542 to
e02bbc7
Compare
Good point, I added the section to the README
As we are basically following the Podman lifecycle here, I'd say we should not care about old systems (kernel < 4.5 and/or podman < 2.x) |
e02bbc7 to
57eeb74
Compare
|
The failure seems to be a flake. Can someone rerun it? |
|
The rerun failed, but that seems to be a real failure: |
Podman 6+ removed support for cgroups v1 and now requires cgroups v2. Mount cgroup2 at `/sys/fs/cgroup` during early boot and ensure the mount point directory is created before mounting. The mount is then moved to the sysroot during switchRoot. Assisted-by: OpenCode (Claude Opus 4)
57eeb74 to
4a7d177
Compare
|
There were some issues in the handling of the mount, i pushed a fix. Also I changed things to mount /proc earlier so we can get proper debug output in mountAPIs() |
Podman 6 removed cgroups v1 support (podman-container-tools/podman#27271).
Specifically, commit e860773c0d added a mandatory check at startup
that verifies
/sys/fs/cgroupis mounted ascgroup2. If the checkfails, Podman exits with: "Cgroups v1 not supported".
Prior to Podman 6, this worked because there was no such verification -
Podman would simply run without cgroups if none were mounted.
Note: osbuild does not actually need cgroup functionality - this is
only to satisfy Podman 6+'s mandatory startup check.
Partially closes: osbuild/osbuild#2502
Assisted-by: OpenCode (Claude Opus 4)