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

Enable 'podman run --memory-swappiness=0' #12272

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

hshiina
Copy link
Contributor

@hshiina hshiina commented Nov 11, 2021

Signed-off-by: Hironori Shiina [email protected]

What this PR does / why we need it:

--memory-swappiness=0 used to work. This patch fixes the regression issue.

How to verify it

Run the added integration test with cgroup v1.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

@rhatdan
Copy link
Member

rhatdan commented Nov 11, 2021

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 11, 2021

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hshiina, rhatdan

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 Nov 11, 2021
@TomSweeneyRedHat
Copy link
Member

@hshiina is there a reported issue against Podman for this? I just want to make sure it gets closed after this merges.
Tests are not happy at all with this change.

@hshiina
Copy link
Contributor Author

hshiina commented Nov 12, 2021

Thank you for pointing out.
Infra containers are still created with memory-swappiness=0 at some locations.
I will recreate the patch.

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 12, 2021
'--memory-swappiness=0' used to work. This patch fixes the regression
issue, which was caused by the change of infra container creation
process.

Signed-off-by: Hironori Shiina <[email protected]>
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 12, 2021
@mheon
Copy link
Member

mheon commented Nov 12, 2021

LGTM, but I'd like a final look from @cdoern

@TomSweeneyRedHat
Copy link
Member

Copy link
Contributor

@cdoern cdoern left a comment

Choose a reason for hiding this comment

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

LGTM, just a few design questions. The overall changes here make sense.

Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(Equal("15"))
})
for _, limit := range []string{"0", "15", "100"} {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there no way to reverse this syntax? I feel like its better to declare the test once and run the same code with different values inside of the single test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think separated tests makes it easy to find which case fails.

@@ -266,6 +266,15 @@ type ContainerCreateOptions struct {
CgroupConf []string
}

func NewInfraContainerCreateOptions() ContainerCreateOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of this, but would it make more sense to make this a struct rather than a function? A struct would more closely resemble our other create options while a function more closely represents our specgenerator process. either way this is a good way to differentiate infra.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new struct for an infra container would be helpful to clarify what parameter is required for creating an infra container. But, I'm not sure how much change is necessary to introduce the new struct. I chose a function to fix this issue with the smaller change.

@rhatdan
Copy link
Member

rhatdan commented Nov 13, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2021
@openshift-merge-robot openshift-merge-robot merged commit cca6df4 into containers:main Nov 13, 2021
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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.

6 participants