-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🐛 ClusterClass: Don't allow concurrent patch upgrades #11940
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
🐛 ClusterClass: Don't allow concurrent patch upgrades #11940
Conversation
/test pull-cluster-api-e2e-main |
/assign @fabriziopandini @chrischdi |
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
LGTM label has been added. Git tree hash: a29d4de0981900f355749206eeb61f2dc5aaa258
|
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.
Only one comment, but up to you if to defer
internal/webhooks/cluster.go
Outdated
@@ -501,7 +494,7 @@ func (webhook *Cluster) validateTopologyVersion(ctx context.Context, fldPath *fi | |||
return field.Invalid( | |||
fldPath, | |||
fldValue, | |||
fmt.Sprintf("minor version update cannot happen at this time: %v", kerrors.NewAggregate(allErrs)), | |||
fmt.Sprintf("version update cannot happen at this time: %v", kerrors.NewAggregate(allErrs)), |
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'm ok to defer to a follow-up PR, but the error messages seems not ideal:
"version update cannot happen at this time: blocking version update due to ControlPlane version check: ControlPlane version %q does not match the current version %q, blocking version update due to MachineDeployment version check: there are MachineDeployments still completing a previous upgrade: [%s], there are MachinePools still completing a previous upgrade: [%s]"
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.
How would you like to optimize it?
@chrischdi Opinions?
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'll give it a try
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.
Should be better now
b9d6f26
to
b2b32e2
Compare
Will take a look.... |
Signed-off-by: Stefan Büringer [email protected]
b2b32e2
to
f314e27
Compare
@fabriziopandini @chrischdi PTAL :) |
/lgtm |
LGTM label has been added. Git tree hash: cca4d55adee6a6f5043f3e61a1b740b01340ca73
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi 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 |
/hold |
/hold cancel As mentioned in the discussion, can also be a follow-up if we want to change more. |
/cherry-pick release-1.9 |
@sbueringer: new pull request created: #11970 In 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. |
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
The Cluster webhook only prevents concurrent minor version upgrades. With this PR we also block concurrent patch upgrades.
The reason is because the Cluster topology controller cannot handle multiple ongoing upgrades correctly.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #