-
Notifications
You must be signed in to change notification settings - Fork 462
daemon: Clearly log if error is from draining #408
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
daemon: Clearly log if error is from draining #408
Conversation
ashcrow
left a comment
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 cancel based on #408 (comment) |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashcrow 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 |
|
pretty sure the error reported on Slack comes from: Otherwise we should have gotten a timeout error right? |
|
Yeah, I agree the error is likely from the |
Saw this in a log: ``` I0211 21:20:46.924255 61902 daemon.go:660] Unable to apply update: rpc error: code = Unknown desc = ``` It must be from the drain; let's make that clear.
68c69a2 to
ec40c08
Compare
| return err | ||
| if lastErr != nil { | ||
| return errors.Wrapf(lastErr, "Failed to drain node (%s tries)", backoff.Steps) | ||
| } |
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.
we're gonna miss the wait.* error this way cause other err may happen other than just timeout if someone, someday adds another err case which return a real err:
// If the condition never returns true, ErrWaitTimeout is returned. All other
// errors terminate immediately.
func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
I was thinking something like https://github.com/openshift/machine-config-operator/blob/master/pkg/operator/sync.go#L357-L362
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 not blocking of course, we control the ConditionFunc here today but if someone jumps and add a return false, err, we're gonna miss it, just to have the same pattern
|
just a comment which is really a nit since we control the ConditionFunc /lgtm |
| IgnoreDaemonsets: true, | ||
| }) | ||
| if err != nil { | ||
| glog.Infof("Draining failed with: %v; retrying...", err) |
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.
Why not keep the logging here to show some progress if we're retrying?
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.
Follow up for this in #412!
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Saw this in a log:
It must be from the drain; let's make that clear.