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
Bug 1795436: update error message when deleting default GCP routes #3049
Bug 1795436: update error message when deleting default GCP routes #3049
Conversation
Default routes cannot be manually deleted in GCP, but that doesn't stop us from trying. These attempts result in error messages that look like this: DEBUG Failed to delete route {default-route-013b0a83601b2182 default-route-013b0a83601b2182 route }: failed to delete route default-route-013b0a83601b2182: googleapi: Error 400: The local route cannot be deleted., badRequest These error messages have led some users, especially in CI to mistake these as significant errors. This commit attempts to make the error message look like something a l ittle more expected: level=debug msg="Failed to delete route default-route-bb10ec00c23c0493: this looks like a default route, which cannot be deleted manually but will be deleted with the corresponding network"
@patrickdillon: This pull request references Bugzilla bug 1795436, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 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/test-infra repository. |
cc @jstuever |
Might be better to not even attempt to delete the default routes? They are picked up in the network-destroy bits[1]. Could probably just modify the filter[2] to exclude them. https://github.com/openshift/installer/blob/master/pkg/destroy/gcp/network.go#L78 |
what if somebody adds a route prefiexed |
@@ -56,6 +57,9 @@ func (o *ClusterUninstaller) deleteRoute(item cloudResource) error { | |||
op, err := o.computeSvc.Routes.Delete(o.ProjectID, item.name).RequestId(o.requestID(item.typeName, item.name)).Context(ctx).Do() | |||
if err != nil && !isNoOp(err) { | |||
o.resetRequestID(item.typeName, item.name) | |||
if strings.HasPrefix(item.name, "default-route") { | |||
return errors.New("this looks like a default route, which cannot be deleted manually but will be deleted with the corresponding network") |
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.
what about error here
installer/pkg/destroy/gcp/route.go
Lines 65 to 68 in 5ea1f2c
if op != nil && op.Status == "DONE" && isErrorStatus(op.HttpErrorStatusCode) { | |
o.resetRequestID(item.typeName, item.name) | |
return errors.Errorf("failed to delete route %s with error: %s", item.name, operationErrorMessage(op)) | |
} |
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.
Hitting this error would be unexpected, so I don't see a need for special handling as in the first case where we expect to hit the error. Let me know if you disagree.
/test e2e-gcp |
/lgtm |
/approve /retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
9 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@patrickdillon: All pull requests linked via external trackers have merged. Bugzilla bug 1795436 has been moved to the MODIFIED state. 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/test-infra repository. |
@patrickdillon: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
Default routes cannot be manually deleted in GCP, but that doesn't stop us from trying. These attempts result in error messages that look like this:
These error messages have led some users, especially in CI to mistake these as significant errors. This commit attempts to make the error message look like something a l
ittle more expected: