Skip to content

libpod: move pasta and rootlessport into the conmon cgroup - #29823

Draft
giuseppe wants to merge 3 commits into
podman-container-tools:mainfrom
giuseppe:pasta-conmon-cgroup
Draft

giuseppe wants to merge 3 commits into
podman-container-tools:mainfrom
giuseppe:pasta-conmon-cgroup

Conversation

@giuseppe

Copy link
Copy Markdown
Contributor

When podman owns the conmon cgroup it only ever put conmon there. The per-container network helpers stayed in whatever cgroup the invoking podman happened to live in so their resources were not accounted to the container and their lifetime was tied to an unrelated cgroup.

Put them in the same cgroup as conmon.

Closes: #29582

Needs: podman-container-tools/container-libs#1207

None

@giuseppe
giuseppe force-pushed the pasta-conmon-cgroup branch 2 times, most recently from dfdd042 to b28c810 Compare September 23, 2026 11:37

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the CI failures are related. I just have a naming concern now. Also, the commit message should say Fixes: instead of Closes:.

Comment thread libpod/oci_conmon_linux.go Outdated
Comment on lines 164 to 166
// moveConmonToCgroupAndSignal gets a container's cgroupParent and moves the conmon process to that cgroup
// it then signals for conmon to start by sending nonce data down the start fd
func (r *ConmonOCIRuntime) moveConmonToCgroupAndSignal(ctr *Container, cmd *exec.Cmd, startFd *os.File) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be renamed? Now, it doesn't move only the common process.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my issue I suggested libpod-support-<CONTAINER_ID>.scope may be a more accurate name for the control group if it contains more processes, but you may consider this a breaking change. I think keeping the function and control group names in sync is best, i.e., change both or neither.

@sarthakkaushik927

sarthakkaushik927 commented Sep 23, 2026 •

Copy link
Copy Markdown
image

@giuseppe, Just a heads-up regarding the failing CI checks: the cockpit-revdeps tests are currently failing because the test environment is missing the systemd-container package.

If you look at the bottom of the logs for the browser tests, it fails with:
./browser.sh: line 88: systemd-nspawn: command not found

My PR #29803 was hitting this exact same infrastructure failure earlier today, so it has nothing to do with your code changes. The code looks great!

link:https://artifacts.dev.testing-farm.io/e84b398e-901d-4825-be77-02520f2dfd97

@giuseppe
giuseppe force-pushed the pasta-conmon-cgroup branch 2 times, most recently from 824cd04 to 8ba8e58 Compare September 23, 2026 13:15
@packit-as-a-service

Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @podman-container-tools/packit-jobs please check. Everyone else, feel free to ignore.

@giuseppe

Copy link
Copy Markdown
Contributor Author

I think the CI failures are related. I just have a naming concern now. Also, the commit message should say Fixes: instead of Closes:.

yes, CI failures were related, we need this ugly workaround for now: https://github.com/podman-container-tools/container-libs/pull/1207/changes#r4084790065

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM,

PTAL @sbrivio-rh

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
The only behaviour change is that a GetLimits() failure now skips the
cgroup instead of creating it with empty resources.  GetLimits() cannot
actually fail today, it only ever returns a nil error.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
When podman owns the conmon cgroup it only ever put conmon there.  The
per-container network helpers stayed in whatever cgroup the invoking
podman happened to live in so their resources were not accounted to
the container and their lifetime was tied to an unrelated cgroup.

Put them in the same cgroup as conmon.

Fixes: podman-container-tools#29582

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
@giuseppe giuseppe added the bloat_approved Approve a PR in which binary file size grows by over 50k label Sep 28, 2026
@mnrx

mnrx commented Oct 2, 2026

Copy link
Copy Markdown

I've read through most of these changes (excluding vendor/), and everything seems to match what we discussed on the issue. Thanks! I think there are some other related issues, but I'll re-evaluate them once I can test this. Will this only land in a 6.x release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat_approved Approve a PR in which binary file size grows by over 50k

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pasta and conmon processes are sometimes left in calling process' control group

4 participants