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

system: add warning when running rootless on cgroupv1 #17589

Conversation

giuseppe
Copy link
Member

when running rootless on cgroupv1, Podman+OCI runtime do not setup a separate cgroup for the container. Spawned containers will run in the same cgroup as the podman system service process, thus will be killed when the cgroup is destroyed, as it is the case when running as a systemd service.

[NO NEW TESTS NEEDED]

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2170444

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 21, 2023
@giuseppe giuseppe marked this pull request as ready for review February 21, 2023 10:33
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 21, 2023
@edsantiago
Copy link
Member

Quick note: this is likely to cause yet more test breakage when we enable cgroupsv1 tests in Debian (and/or in RHEL gating tests). I don't know which tests will fail, but new warnings == new test failures.

@@ -106,6 +108,13 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
// Close the fd right away to not leak it during the entire time of the service.
devNullfile.Close()

cgroupv2, _ := cgroups.IsCgroup2UnifiedMode()
fmt.Printf("rootless.IsRootless() && !cgroupv2 %v %v\n", rootless.IsRootless(), cgroupv2)
Copy link
Member

Choose a reason for hiding this comment

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

debug output?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes sorry for leaving that, dropped now.

@edsantiago edsantiago added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 21, 2023
@edsantiago
Copy link
Member

I am sorry, I know this is rude: I am adding a do-not-merge label. #17305 is really, really close to merging. @cevich has labored many many hours on it over many weeks. I would like that one to merge first, then this one (17589, the warning-message) to rebase and deal with the fallout from the warning message. It is not fair to impose that burden on Chris, or worse on some poor random person who gets the union of both PRs without that conflict resolution. Thank you for understanding.

@cevich
Copy link
Member

cevich commented Feb 21, 2023

What are you talking about? 17305 was no effort at all. Passed CI moments after I first pushed it!

Thanks Ed, I'm a bit bias, but I agree 😁 17305 has been a proper epic PR with a distro-switch and dredging up of so many long-untested pathways. It was bound to be the nightmare and I'm not surprised conflicts were quick to arise.

@edsantiago
Copy link
Member

@giuseppe, #17305 has merged, please rebase and repush when convenient. Thanks for your patience.

@giuseppe giuseppe force-pushed the add-warning-rootless-system-service-cgroupv1 branch from cc15231 to 65432e4 Compare February 23, 2023 10:25
when running rootless on cgroupv1, Podman+OCI runtime do not setup a
separate cgroup for the container.  Spawned containers will run in the
same cgroup as the podman system service process, thus will be killed
when the cgroup is destroyed, as it is the case when running as a
systemd service.

[NO NEW TESTS NEEDED]

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2170444

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the add-warning-rootless-system-service-cgroupv1 branch from 65432e4 to 4b3b944 Compare February 23, 2023 10:28
@giuseppe
Copy link
Member Author

I am sorry, I know this is rude: I am adding a do-not-merge label. #17305 is really, really close to merging. @cevich has labored many many hours on it over many weeks. I would like that one to merge first, then this one (17589, the warning-message) to rebase and deal with the fallout from the warning message. It is not fair to impose that burden on Chris, or worse on some poor random person who gets the union of both PRs without that conflict resolution. Thank you for understanding.

no that is completely fine. Thanks for blocking it and not causing more issues to the long-standing PR :-)

rebased and pushed a new version

@rhatdan
Copy link
Member

rhatdan commented Feb 23, 2023

LGTM

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99
Copy link
Member

Luap99 commented Feb 23, 2023

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 23, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2023
@edsantiago edsantiago removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 23, 2023
@edsantiago
Copy link
Member

Holds canceled. Thank you!

@openshift-merge-robot openshift-merge-robot merged commit 949b3ac into containers:main Feb 23, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants