-
Notifications
You must be signed in to change notification settings - Fork 138
Fix for Machine (sometimes) getting stuck with empty phase when finalizer addition exhausts retry budget #1142
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1197,6 +1197,12 @@ func (c *controller) addMachineFinalizers(ctx context.Context, machine *v1alpha1 | |
| clone.Finalizers = finalizers.List() | ||
| _, err := c.controlMachineClient.Machines(clone.Namespace).Update(ctx, clone, metav1.UpdateOptions{}) | ||
| if err != nil { | ||
| if apierrors.IsConflict(err) { | ||
| // Informer cache is stale; the watch event will re-enqueue the machine once the | ||
| // cache catches up, so this is not a retriable error from the worker's perspective. | ||
| // Returning nil avoids burning a retry slot from the fixed budget (DefaultMaxRetries). | ||
| return machineutils.ShortRetry, nil | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it matters, the caller discards the retry period. Can we change the signature to return just an error then? The function is only used in one place which discards the retry period returned. |
||
| } | ||
| // Keep retrying until update goes through | ||
| klog.Errorf("Failed to add finalizers for machine %q: %s", machine.Name, err) | ||
| } else { | ||
|
|
||
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.
Would come handy when debugging