-
Notifications
You must be signed in to change notification settings - Fork 41.9k
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
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. |
| 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
giuseppe
left a comment
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 |
|
LGTM label has been added. Git tree hash: 30fca49d6f5e49a116ee1a3ee78a4a3284186a89
|
|
@bitoku one nit, can you split the commits, such that one is touching |
|
Hi @soltysh, thanks for the review. |
It's easier to review, since the actual code changes are handled manually and require more thorough checks, whereas the automatic vendor changes less so. It's a general practice used in the project to have these two separate. Something similar applies to changes coming from running |
|
Is there a plan to backport this to 1.33 once it’s merged? |
|
@sohankunkerkar |
| @@ -0,0 +1,50 @@ | |||
| /* | |||
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.
the name implies that this file will have some build directives
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.
The file suffix is also respected as a build constraint.
https://pkg.go.dev/go/build#hdr-Build_Constraints
These files don't have one either.
kubernetes/pkg/kubelet/cm/util/cgroups_linux.go
Lines 1 to 3 in 5ecddb6
| /* | |
| Copyright 2016 The Kubernetes Authors. | |
kubernetes/cmd/kubelet/app/server_linux.go
Lines 1 to 3 in 7ddb042
| /* | |
| Copyright 2015 The Kubernetes Authors. | |
SergeyKanzhelev
left a comment
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.
beyond the build directive this LGTM
SergeyKanzhelev
left a comment
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
/approve
|
@liggitt Can you PTAL as dep-approver? |
|
|
||
| // Resources contains various cgroups settings to apply. | ||
| *Resources `json:"Resources,omitempty"` | ||
| *Resources |
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.
was it intentional to change the serialization upstream? this will now serialize explicit null values... does that impact us in any user-facing way?
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 believe the kubelet serializes this cgroup object at all, it's kept as a go structure AFAIU and not read to or from anything. It's possible CRI implementations do, but this vendor doesn't affect that... we only use it in libctCgroupConfig and in every case it's used it's immediately passed to libctr.New() function
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bitoku, giuseppe, liggitt, SergeyKanzhelev 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 |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
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.: