Repository navigation
Avoid returning error when annotation patch for InPlaceOrResize fails - #9115
Conversation
|
@adrianmoisey: GitHub didn't allow me to request PR reviews from the following users: jkyros. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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. |
4c797d6 to
3677e1b
Compare
| if err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
I like the retry idea, but I generally think that even if the annotation patch doesn't go through, it shouldn't block whether the overall operation was a failure or not. I think maybe we should think about not returning an error, but just logging it. The annotation isn't really a big deal, I don't think it's used other than for cosmetic reasons.
But also now thinking about it, what happens if all pods for resize in one loop have to retry? That's around 300ms per pod, and I don't think that we're doing concurrent updates here right?
There was a problem hiding this comment.
All valid points, thanks Max.
But also now thinking about it, what happens if all pods for resize in one loop have to retry? That's around 300ms per pod, and I don't think that we're doing concurrent updates here right?
I had thought about this, and originally came to the conclusion that a scenario where all annotation patcher were to fail, then all the resizes would fail first, causing the patch to not be executed. But it turns out that this situation is actually possibly, if someone reduces the RBAC to only pods/resize only, see:
autoscaler/vertical-pod-autoscaler/deploy/vpa-rbac.yaml
Lines 133 to 135 in ce55a88
I think maybe we should think about not returning an error, but just logging it.
Agree, I'll remove the retry and add a log entry
So that it doesn't create an error and cause the pod to get evicted
3677e1b to
d03a10b
Compare
omerap12
left a comment
There was a problem hiding this comment.
Thanks!
/lgtm
should we also backport this?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianmoisey, omerap12 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Good idea! /cherry-pick vpa-release-1.5 |
|
@adrianmoisey: new pull request created: #9124 DetailsIn response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This should help mitigate the issue here: #9080
(but it's still possible that this annotation patch fails 3 times, and causes the pod to be recreated)
Which issue(s) this PR fixes:
Fixes #9080
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/cc @omerap12 @maxcao13 @jkyros