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

exact string match fails, use conventional errors.Is instead #1526

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

furkhat
Copy link
Contributor

@furkhat furkhat commented Jan 10, 2023

What this PR does / why we need it:

Fixes a bug when machine-controller fails on 404 when deleting already gone floating-ip or server.
Example failure

failed to delete machine at cloud provider, due to failed to clean up floating ip: failed to delete floating ip a87484bd-4ba6-4c18-8b7e-27b98606d240: Resource not found: [DELETE https://example-cloud.net:9696/v2.0/floatingips/a87484bd-4ba6-4c18-8b7e-27b98606d240], error message: {"NeutronError": {"message": "Floating IP a87484bd-4ba6-4c18-8b7e-27b98606d240 could not be found", "type": "FloatingIPNotFound", "detail": ""}}

Exact string match against "Resource not found" does not work because gophercloud v1.1.1, as well as previous versions, return

 fmt.Sprintf(
        "Resource not found: [%s %s], error message: %s",
	e.Method, e.URL, e.Body,
)

Which issue(s) this PR fixes:

Fixes #

What type of PR is this?
/kind bug

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

Fix Openstack IP cleanup

Documentation:

NONE

@kubermatic-bot kubermatic-bot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. sig/osm Denotes a PR or issue as being assigned to SIG OSM. dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 10, 2023
@kubermatic-bot
Copy link
Contributor

Hi @furkhat. Thanks for your PR.

I'm waiting for a kubermatic member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@kubermatic-bot kubermatic-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 10, 2023
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. labels Jan 10, 2023
Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7e79656e2b726651e9ecaba71ee832509f743f70

@xrstf
Copy link
Contributor

xrstf commented Jan 10, 2023

/ok-to-test

@kubermatic-bot kubermatic-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Jan 10, 2023
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmedwaleedmalik, furkhat, xrstf

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2023
@kubermatic-bot kubermatic-bot merged commit cea61b3 into kubermatic:main Jan 10, 2023
@furkhat furkhat deleted the fails-on-404 branch January 11, 2023 08:08
furkhat added a commit to syseleven/machine-controller that referenced this pull request Jan 11, 2023
…tic#1526)

Signed-off-by: Furkhat Kasymovgeniiuulu <[email protected]>

Signed-off-by: Furkhat Kasymovgeniiuulu <[email protected]>
multi-io pushed a commit to syseleven/machine-controller that referenced this pull request Jan 12, 2023
…tic#1526)

Signed-off-by: Furkhat Kasymovgeniiuulu <[email protected]>

Signed-off-by: Furkhat Kasymovgeniiuulu <[email protected]>
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/osm Denotes a PR or issue as being assigned to SIG OSM. 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.

4 participants