Stop dropping status.FloatingID when OpenStack API returns 404#449
Merged
Stop dropping status.FloatingID when OpenStack API returns 404#449
status.FloatingID when OpenStack API returns 404#449Conversation
status.FloatingID if OpenStack API returns 404status.FloatingID when OpenStack API returns 404
status.FloatingID when OpenStack API returns 404status.FloatingID when OpenStack API returns 404
Kumm-Kai
requested changes
Dec 3, 2024
controllers/yawol-controller/loadbalancer/loadbalancer_controller.go
Outdated
Show resolved
Hide resolved
controllers/yawol-controller/loadbalancer/loadbalancer_controller.go
Outdated
Show resolved
Hide resolved
controllers/yawol-controller/loadbalancer/loadbalancer_controller.go
Outdated
Show resolved
Hide resolved
controllers/yawol-controller/loadbalancer/loadbalancer_controller.go
Outdated
Show resolved
Hide resolved
Contributor
Author
|
/hold |
Kumm-Kai
approved these changes
Dec 4, 2024
2face5e to
78071ef
Compare
status.FloatingID when OpenStack API returns 404status.FloatingID when OpenStack API returns 404
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/kind bug
Bug description
If the OpenStack API returns any error when fetching the
FIP, theyawol-controllerremove the.status.FloatingIDfield from theLoadBalancerobject.This will create a new
FIPfor theLoadBalancerin the subsequent reconciliation.This would be fine if the
FIPgot deleted and is indeed not existent anymore.But if the OpenStack API has an outage, and we get errors due to that, the removal of the status field will result in an orphaned
FIP.What does the change do ?
Do not remove
.status.FloatingIDif it cannot be retrieved fromOpenStack.Drop of
gophercloud.ErrUnexpectedResponseCodeinside the switch (type), because this will make the default case (nearly) unreachable. (default ingophercloudevery Response which is not OK (2xx) will be of this type).Noteworthy
If the
FIPgets somehow deleted in OpenStack (e.g., by a human operator), theLoadBalanceris obviously broken, which can't be fixed by the reconciliation anymore.The only solution then is, to manually remove the
floatingIDfrom the status, in order to trigger creation of a new one.Checklist