Stop dropping status.FloatingID
when OpenStack API returns 404
#449
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-controller
remove the.status.FloatingID
field from theLoadBalancer
object.This will create a new
FIP
for theLoadBalancer
in the subsequent reconciliation.This would be fine if the
FIP
got 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.FloatingID
if it cannot be retrieved fromOpenStack
.Drop of
gophercloud.ErrUnexpectedResponseCode
inside the switch (type), because this will make the default case (nearly) unreachable. (default ingophercloud
every Response which is not OK (2xx) will be of this type).Noteworthy
If the
FIP
gets somehow deleted in OpenStack (e.g., by a human operator), theLoadBalancer
is obviously broken, which can't be fixed by the reconciliation anymore.The only solution then is, to manually remove the
floatingID
from the status, in order to trigger creation of a new one.Checklist