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

Fix/dont lose ips #24

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Conversation

expektorans
Copy link

Add additional debug statements and treat failed fip creation as an error. See #23

@@ -185,8 +188,9 @@ func (pm *OpenStackL3PortManager) ProvisionPort() (string, error) {
if pm.cfg.UseFloatingIPs {
err = pm.provisionFloatingIP(port.ID)
if err != nil {
klog.Warningf("Couldn't provide floating ip for port=%v", port.ID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Log the error

Yannic Ahrens added 2 commits February 12, 2021 10:26
If for some reason the creation of a floating IP (fip) in OpenStack fails it
should be made clear this is unexpected behaviour. One obvious reason
for a failed fip creation are quotas. If no fip was provided, this led
to the following execution flow:

- fip creation failed
- port is deleted
- "" is returned as port ID
- in the next round, the controller wants to look up the port with
  non-existing port with the zero-length ID and crashes
- horrible things happen from this stage on

By returning an error none of the above will happen and the pending
service(s) are re-queued for port/fip creation in the next iteration.
This commit injects debug statements in several spots to trace the
internal process of mapping and unmapping services to L3 ports.
@horazont horazont merged commit b682256 into cloudandheat:master Feb 12, 2021
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