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

Add support for PidsLimit in quadlet #19955

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Sep 12, 2023

QM needs to be able to specify the maximum number of PIDs within the QM environment to ensure FFI.
Picking a total of 10,000 Pids might be a rasonable constraint on the QM.

Does this PR introduce a user-facing change?

Quadlet now supports seeing the PidsLimit option in a container.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2023
rhatdan added a commit to rhatdan/qm that referenced this pull request Sep 12, 2023
The default limit on number of processes within the container is 1024.
This is far too low for QM. Selecting 10000 seems like a better number
but really this needs to be set by the final distributor of the OS.

Requires containers/podman#19955 to be in
Podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Copy link

@Yarboa Yarboa left a comment

Choose a reason for hiding this comment

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

LGTM

### `PidsLimit=`

Tune the container's pids limit.
This is equivalent to the Podman `--pids-limit` option
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This is equivalent to the Podman `--pids-limit` option
This is equivalent to the Podman `--pids-limit` option.

Comment on lines 454 to 457
pidsLimit, _ := container.Lookup(ContainerGroup, KeyPidsLimit)
if len(pidsLimit) > 0 {
podman.add("--pids-limit", pidsLimit)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pidsLimit, _ := container.Lookup(ContainerGroup, KeyPidsLimit)
if len(pidsLimit) > 0 {
podman.add("--pids-limit", pidsLimit)
}
pidsLimit, ok := container.Lookup(ContainerGroup, KeyPidsLimit)
if ok && len(pidsLimit) > 0 {
podman.add("--pids-limit", pidsLimit)
}

QM needs to be able to specify the maximum number of PIDs within the QM
environment to ensure FFI.
Picking a total of 10,000 Pids might be a rasonable constraint on the
QM.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member Author

rhatdan commented Sep 14, 2023

@TomSweeneyRedHat @ygalblum PTAL

Copy link
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, Yarboa, ygalblum

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

@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2023
@openshift-merge-robot openshift-merge-robot merged commit 88b415e into containers:main Sep 14, 2023
Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

Past the cutoff, but LGTM fwiw

@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 Dec 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants