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

stats: get mem limit from the cgroup #18630

Merged
merged 1 commit into from
May 19, 2023

Conversation

giuseppe
Copy link
Member

b25b330 introduced this behaviour.

It was fine at the time because we didn't support "container update", so the limit could not be changed at runtime. Since it is not possible to change the memory limit at runtime, read the limit as reported from the cgroup.

containers/crun#1217 is required for crun.

[NO NEW TESTS NEEDED] needs a new crun release

Closes: #18621

Does this PR introduce a user-facing change?

podman stats reads the memory limit from the cgroup

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 19, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2023
@giuseppe giuseppe force-pushed the fix-mem-limit-stats branch 3 times, most recently from 90f9c1f to 35b533d Compare May 19, 2023 10:22
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.

Can you add a test and add something like SkipIfCrun("crun x.y.z required") then someone could enable it at a later point instead of having no test at all.

@giuseppe giuseppe force-pushed the fix-mem-limit-stats branch from 35b533d to b822c40 Compare May 19, 2023 11:30
@giuseppe
Copy link
Member Author

Can you add a test and add something like SkipIfCrun("crun x.y.z required") then someone could enable it at a later point instead of having no test at all.

yes that is a better idea. Added

@rhatdan
Copy link
Member

rhatdan commented May 19, 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
/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 May 19, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 19, 2023
@giuseppe giuseppe force-pushed the fix-mem-limit-stats branch from b822c40 to 89087bc Compare May 19, 2023 11:51
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 19, 2023
b25b330 introduced this behaviour.

It was fine at the time because we didn't support "container update",
so the limit could not be changed at runtime.  Since it is not
possible to change the memory limit at runtime, read the limit as
reported from the cgroup.

containers/crun#1217 is required for crun.

Closes: containers#18621

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the fix-mem-limit-stats branch from 89087bc to 7c53a46 Compare May 19, 2023 13:00
@Luap99
Copy link
Member

Luap99 commented May 19, 2023

/lgtm
/hold cancel

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 19, 2023
@openshift-merge-robot openshift-merge-robot merged commit 8d0cde0 into containers:main May 19, 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 Aug 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman update doesn't have effect on memory limit
4 participants