-
Notifications
You must be signed in to change notification settings - Fork 2.9k
oci_conmon: do not create a cgroup under systemd #4861
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
oci_conmon: do not create a cgroup under systemd #4861
Conversation
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
docs/source/markdown/podman-run.1.md
Outdated
| @@ -92,8 +92,9 @@ If the host uses cgroups v1, the default is set to **host**. On cgroups v2 the | |||
| **--cgroups**=*mode* | |||
|
|
|||
| Determines whether the container will create CGroups. | |||
| Valid values are *enabled* and *disabled*, which the default being *enabled*. | |||
| Valid values are *enabled*, *disabled*, *disabled-conmon*, which the default being *enabled*. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think no-conmon would be a better name, but I'd like other folks to agree to that before we change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrothberg do you have any preference on the naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a preference.
|
how to move forward? I rename the new option to |
SGTM |
c912932 to
ba1160c
Compare
2db6dc1 to
0c270d7
Compare
|
Can you add ("enabled"|"disabled"|"no-conmon") to the command line option? @edsantiago uses this for generation of the completion flags. |
pkg/spec/namespaces.go
Outdated
| @@ -216,6 +216,9 @@ func (c *CgroupConfig) ToCreateOptions(runtime *libpod.Runtime) ([]libpod.CtrCre | |||
| if c.Cgroups == "disabled" { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should disable this and remove WithNoCgroups, and move everything to use WithCgroupsMode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to retain NoCgroups in the database and keep supporting it there for legacy reasons, but we should move all new containers over to use the new version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are depracatng it, then remove it from the docs and hide the option. No reason for people to continue to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should continue working - we're just changing the way we store it in the database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I thought we were discouraging an option?
0c270d7 to
7324b39
Compare
|
Just the way we used to store it in the DB - want to move from a bool to a
string
…On Wed, Jan 15, 2020, 18:13 Daniel J Walsh ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/spec/namespaces.go
<#4861 (comment)>:
> @@ -216,6 +216,9 @@ func (c *CgroupConfig) ToCreateOptions(runtime *libpod.Runtime) ([]libpod.CtrCre
if c.Cgroups == "disabled" {
But I thought we were discouraging an option?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4861>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCDERFFA4AFMA6JTG5LQ56J7ZANCNFSM4KGUCQ2A>
.
|
5778fc3 to
b71b77c
Compare
|
☔ The latest upstream changes (presumably #4884) made this pull request unmergeable. Please resolve the merge conflicts. |
it allows to disable cgroups creation only for the conmon process. A new cgroup is created for the container payload. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
b71b77c to
433a8c2
Compare
Detect whether we are running under systemd (if the INVOCATION_ID is set). If Podman is running under a systemd service, we do not need to create a cgroup for conmon. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
433a8c2 to
1951ff1
Compare
|
tests are passing |
|
LGTM |
|
@mheon are you fine with the current version? |
|
Looking... |
|
/lgtm |
|
/hold cancel |
|
/test images |
1 similar comment
|
/test images |
|
/retest |
|
/test images |
Detect whether we are running under systemd (if the INVOCATION_ID is set). If Podman is running under a systemd service, we do not need to create a cgroup for conmon.
The variable is set only on new systemd versions (the version on RHEL8 seems fine and sets it), so for older versions add a
--cgroups=no-conmonoption to disable cgroups for conmon.Closes: #4833
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com