Skip to content
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

pkg/daemon/update.go: check wait err and wrap it #416

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

runcom
Copy link
Member

@runcom runcom commented Feb 12, 2019

we missed checking it https://github.com/openshift/machine-config-operator/blob/master/pkg/daemon/update.go#L92

also, refactored the condition function a bit to be more future proof (i.e. someone comes and add a return false, err)

Signed-off-by: Antonio Murdaca runcom@linux.com

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 12, 2019
@runcom
Copy link
Member Author

runcom commented Feb 12, 2019

aws ❤️

@ashcrow
Copy link
Member

ashcrow commented Feb 12, 2019

aws heart

Yeah. Looks like resources.

@runcom
Copy link
Member Author

runcom commented Feb 13, 2019

/retest

1 similar comment
@runcom
Copy link
Member Author

runcom commented Feb 13, 2019

/retest

if err == nil {
return true, nil
}
lastErr = fmt.Errorf("draining failed with: %v", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just doing glog.Infof() for the error message here and leaving lastErr = err? Then if we wrap it later, we can still get back the original error that happened. (Anyway, "failed to drain node (5 tries): draining failed with: ..." is kinda repetitive, no? :))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks!

@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

1 similar comment
@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

@jlebon
Copy link
Member

jlebon commented Feb 14, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlebon, runcom

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

3 similar comments
@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

@runcom
Copy link
Member Author

runcom commented Feb 14, 2019

/retest

@openshift-merge-robot openshift-merge-robot merged commit fe2d179 into openshift:master Feb 15, 2019
@runcom runcom deleted the check-err-wait branch February 15, 2019 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants