-
Notifications
You must be signed in to change notification settings - Fork 669
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
RemoveFailedPods: guard against nil descheduler strategy (e.g. in case of default that loads all strategies) #632
RemoveFailedPods: guard against nil descheduler strategy (e.g. in case of default that loads all strategies) #632
Conversation
…e of default that loads all strategies)
Hi @a7i. Thanks for your PR. I'm waiting for a kubernetes-sigs 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/test-infra repository. |
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 error reported came from line 44: /go/src/sigs.k8s.io/descheduler/pkg/descheduler/strategies/failedpods.go:44 +0x70
So, we also need to add a guard for the priority threshold to be non-nil https://github.com/kubernetes-sigs/descheduler/pull/632/files#diff-413def6475d16ce340793b62bb4c179595cc28669ad68d474763006464d8ee65R44
Also, would be good to add a test for this. It should probably be an e2e so that the whole config gets tested against (rather than just the eviction logic in a unit test) |
Hey @damemi thresholdPriority blongs to
I have added a unit test which will catch the error if reverted back to reference. |
@a7i Ah, I see. The test looks good too, thanks. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a7i, damemi 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 |
/ok-to-test |
Yes, good idea. I will work on that in parallel but may take me a day or two. |
/retest |
…king for topology spread across domains
Let's do it in this PR as well. Unless it's critical to fix this right away. |
@ingvagabund I would consider this critical since the strategy crashes in the default use case which causes the entire program to crash. We should merge this asap and release a patch to the v0.22 image. @a7i will you be able to add the e2e in the next day or so? If not, we can merge this and work on the e2e |
da1675e
to
bcc661d
Compare
@ingvagabund / @damemi Added a comprehensive set of tests for FailedPods strategy. Kept the commits separate for better organization/tracking. |
Fix priority class default
bcc661d
to
f7c26ef
Compare
I have no more comments, @ingvagabund do you? @a7i could you also open a PR to the |
/lgtm |
@a7i thank you!!! |
RemoveFailedPods: guard against nil descheduler strategy (e.g. in case of default that loads all strategies)
Closes #630
Background: Descheduler by default loads all strategies and as a result, the strategy params can be nil. The strategy needs to guard against that.