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

Check for ErrDefault500 when creating/deleting pool member #12664

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

kars7e
Copy link
Contributor

@kars7e kars7e commented Mar 14, 2017

If LBaaSV2 member creation/deletion is attempted while LB resource is
busy (for example it's in PENDING_UPDATE state), Neutron will return 500
error. Currently This being caught by type assertion to
ErrUnexpectedResponseCode, however error 500 has a dedicated type
ErrDefault500, which makes the current type assertion to miss it and
eventually the error slips out through the check. This patch
changes the type assertion to explicitly check for ErrDefault500.

Also similar check has been added when member is deleted.

If LBaaSV2 member creation/deletion is attempted while LB resource is
busy (for example it's in PENDING_UPDATE state), Neutron will return 500
error. Currently This being caught by type assertion to
ErrUnexpectedResponseCode, however error 500 has a dedicated type
ErrDefault500, which makes the current type assertion to miss it and
eventually the error slips out through the check. This patch
changes the type assertion to explicitly check for ErrDefault500.

Also similar check has been added when member is deleted.
@kars7e
Copy link
Contributor Author

kars7e commented Mar 14, 2017

I was hitting following error:

openstack_lb_member_v2.k8s-member-1: Error deleting OpenStack LBaaSV2 Member: Internal Server Error

When deleting a member (or similar, respective error when creating it). I was able to track it down to the fact 500 error had its own concrete type, and assertion with that type was required.

I've tested this patch in our production environment and it works, no more errors when deleting/creating pool members!

@jtopjian
Copy link
Contributor

@kars7e Nice catch - thank you! I'll do a quick test of this tonight.

@jtopjian
Copy link
Contributor

LGTM!

@stack72 This checks out on my end. :)

@stack72
Copy link
Contributor

stack72 commented Mar 14, 2017

LGTM - thanks @kars7e / @jtopjian

@stack72 stack72 merged commit 1fef190 into hashicorp:master Mar 14, 2017
stack72 pushed a commit that referenced this pull request Mar 14, 2017
If LBaaSV2 member creation/deletion is attempted while LB resource is
busy (for example it's in PENDING_UPDATE state), Neutron will return 500
error. Currently This being caught by type assertion to
ErrUnexpectedResponseCode, however error 500 has a dedicated type
ErrDefault500, which makes the current type assertion to miss it and
eventually the error slips out through the check. This patch
changes the type assertion to explicitly check for ErrDefault500.

Also similar check has been added when member is deleted.
@ghost
Copy link

ghost commented Apr 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants