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

Stop dropping status.FloatingID when OpenStack API returns 404 #449

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

rgroemmer
Copy link
Contributor

@rgroemmer rgroemmer commented Dec 2, 2024

/kind bug

Bug description
If the OpenStack API returns any error when fetching the FIP, the yawol-controller remove the .status.FloatingID field from the LoadBalancer object.
This will create a new FIP for the LoadBalancer 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 from OpenStack.
Drop of gophercloud.ErrUnexpectedResponseCode inside the switch (type), because this will make the default case (nearly) unreachable. (default in gophercloud 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), the LoadBalancer 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

  • Test locally before merge

@Kumm-Kai Kumm-Kai changed the title Preserve status.FloatingID if OpenStack API returns 404 Stop dropping status.FloatingID when OpenStack API returns 404 Dec 2, 2024
@rgroemmer rgroemmer changed the title Stop dropping status.FloatingID when OpenStack API returns 404 WIP: Stop dropping status.FloatingID when OpenStack API returns 404 Dec 2, 2024
@rgroemmer
Copy link
Contributor Author

/hold
testing locally

@rgroemmer rgroemmer requested a review from Kumm-Kai December 4, 2024 12:41
@Kumm-Kai Kumm-Kai enabled auto-merge (squash) December 4, 2024 13:31
@Kumm-Kai Kumm-Kai force-pushed the fix/preserve-fip-in-status branch from 2face5e to 78071ef Compare December 4, 2024 13:31
@Kumm-Kai Kumm-Kai merged commit cfb8cec into main Dec 4, 2024
1 check passed
@Kumm-Kai Kumm-Kai deleted the fix/preserve-fip-in-status branch December 4, 2024 13:39
@rgroemmer rgroemmer changed the title WIP: Stop dropping status.FloatingID when OpenStack API returns 404 Stop dropping status.FloatingID when OpenStack API returns 404 Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants