-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Ensure orphan public IPs deleted #70463
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
09aaeea
to
4702214
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, leave some minor comments
return err | ||
} | ||
} | ||
glog.V(10).Infof("DeletePublicIPWithRetry(%s, %q): end", pipResourceGroup, pipName) // response not read yet... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read
--> ready
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is actually misleading, let me remove it.
frontendIPConfigUpdated := false | ||
loadBalancerRuleUpdated := false | ||
|
||
// Check whether there are still frontend IP configurations referring it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
referring to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
4702214
to
9aeb005
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/test pull-kubernetes-integration |
@feiskyer - I'm also able to reproduce another edge case: Delete a loadbalancer service then recreate it before the cleanup. The service will still a pending state the front-end IP being not cleaned up. (this is not a blocker for this one though) |
…63-upstream-release-1.12 Automated cherry pick of #70463: Ensure orphan public IPs deleted
…63-upstream-release-1.10 Automated cherry pick of #70463: Ensure orphan public IPs deleted
…63-upstream-release-1.11 Automated cherry pick of #70463: Ensure orphan public IPs deleted
What type of PR is this?
What this PR does / why we need it:
After kube-controller-manager restarted, it may get stuck in ensure load balancer as it's trying to delete a public IP that's referenced by an orphan frontend configuration which is no longer referenced by any k8s service.
This PR removed referenced frontend IP configurations and load balancer rules before deleting the public IP.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #69352
Special notes for your reviewer:
Note: this is a workaround for #69352, it only deletes orphan public IPs when service recreated with the same name. To complete resolve orphaned load balancer issue, service finalizer should be added (probably v1.14).
Does this PR introduce a user-facing change?:
/sig azure
/kind bug
/milestone v1.13
/cc @brendandburns @khenidak @andyzhangx