-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Update pod resize test to accept new cpu.weight conversion. #132791
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
base: master
Are you sure you want to change the base?
Conversation
Hi @bitoku. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -218,9 +219,12 @@ func getExpectedCPUShares(rr *v1.ResourceRequirements, podOnCgroupv2 bool) int64 | |||
} | |||
if podOnCgroupv2 { | |||
// TODO: This fomula should be a shared function. | |||
return 1 + ((shares-2)*9999)/262142 | |||
// TODO: Remove the old conversion once container runtimes are updated. |
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.
can you add a link to the oci runtime changes/issues to track why we check both?
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 added the description. let me know if anything unclear.
9e7062f
to
b6d4eda
Compare
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.
LGTM
There are other instances of this conversion in the code. Will they be addressed separately? |
@giuseppe I just didn't realize other instances. I'd like to include them in this PR. Can you point out for me? |
these are the ones I see:
most of them are mechanical, except |
88b9c9b
to
36b9084
Compare
Do we want to reimplement the conversion in kubernetes, not importing from opencontainers/runc? |
@bitoku I think it could be fixed by setting the test as linux only similar to https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/cgroup_driver_from_cri_test.go#L1-L2 |
/retest |
test/e2e/node/pod_resize.go
Outdated
@@ -1,3 +1,5 @@ | |||
//go:build linux |
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.
hmm @tallclair do we expect to have pod resize on windows? if so, we may need to factor out the relevant bits to be _linux.go, but I'm gonna guess it's out of scope for now?
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.
As long as I checked them, those tests are skipped, but it may be better to use _linux.go instead just in case.
Signed-off-by: Ayato Tokubi <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bitoku, giuseppe The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The CI is green. PTAL |
/lgtm not urgent, we can get this in 1.35 |
LGTM label has been added. Git tree hash: ec9e87dd03b566a2b1938e880613f0cabc88f8c8
|
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
Because of the changes in conversion of cpu.weight in cgroupv2, the InPlacePodVerticalScaling tests no longer pass.
This change enables graceful migration from the old conversion to the new conversion, not to break the CI.
Which issue(s) this PR is related to:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: