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

Bug 1795436: update error message when deleting default GCP routes #3049

Merged

Conversation

patrickdillon
Copy link
Contributor

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:

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:

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

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"
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Feb 3, 2020
@openshift-ci-robot
Copy link
Contributor

@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:

Bug 1795436: update error message when deleting default GCP routes

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.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 3, 2020
@patrickdillon
Copy link
Contributor Author

cc @jstuever

@jstuever
Copy link
Contributor

jstuever commented Feb 3, 2020

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
https://github.com/openshift/installer/blob/master/pkg/destroy/gcp/route.go#L12

@abhinavdahiya
Copy link
Contributor

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
https://github.com/openshift/installer/blob/master/pkg/destroy/gcp/route.go#L12

what if somebody adds a route prefiexed default-route ?? we would skip the deletion for it and loop failing to delete the network?

@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

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

what about error here

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))
}
??

Copy link
Contributor Author

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.

@abhinavdahiya
Copy link
Contributor

/test e2e-gcp

@jstuever
Copy link
Contributor

jstuever commented Feb 4, 2020

/lgtm

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

/approve

/retest

@openshift-ci-robot
Copy link
Contributor

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 4, 2020
@openshift-bot
Copy link
Contributor

/retest

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

9 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit 07cb9cb into openshift:master Feb 5, 2020
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: All pull requests linked via external trackers have merged. Bugzilla bug 1795436 has been moved to the MODIFIED state.

In response to this:

Bug 1795436: update error message when deleting default GCP routes

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.

@openshift-ci-robot
Copy link
Contributor

@patrickdillon: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-libvirt 5ea1f2c link /test e2e-libvirt
ci/prow/e2e-ovirt 5ea1f2c link /test e2e-ovirt
ci/prow/e2e-aws-scaleup-rhel7 5ea1f2c link /test e2e-aws-scaleup-rhel7

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants