-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
apps: retry when scaler hits the conflict #19271
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfojtik 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 |
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 am fine with this hot fix, while we look for what went wrong and better way to fix it
@tnozicka lets wait for the tests to prove this is fixing the problem, I'm still curious why the new genericScaler is not handing the conflicts (if that is per-design)... Also wonder if upstream deployments scaler is dealing with conflicts in the caller now (not that deployers acts as kubectl client here, so I guess this should be handled somewhere in kubectl scale code?) |
/cc @liggitt |
@@ -234,6 +234,10 @@ func (s *RecreateDeploymentStrategy) scaleAndWait(deployment *kapi.ReplicationCo | |||
if scaleErr == nil { | |||
return true, nil | |||
} | |||
// Handle conflicts (shouldn't this be already handled by the scaler?) |
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.
it was bugged. kubernetes/kubernetes#61790 comes to mind.
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.
That only fixes the result, not the cause. Do we want the scalers to handle conflicts? Personally, the current approach is fine, it's the callers duty to handle those.
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.
This is another reason we should not use kubectl scaler but rather directly implement that functionality.
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 genericScaler should already handle retries on conflict
conflicts are handled here: origin/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go Lines 548 to 549 in bdd4e1b
and here: origin/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go Lines 132 to 136 in bdd4e1b
|
Closing in favor of #19275 |
Fixes: #19270
This is weird, seems like the new
genericScaler
does not handle the conflicts? Probably need more investigation.//cc @tnozicka
//cc @DirectXMan12