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

Ensure orphan public IPs deleted #70463

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

feiskyer
Copy link
Member

@feiskyer feiskyer commented Oct 31, 2018

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

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?:

Ensure orphan public IPs on Azure deleted when service recreated with the same name.

/sig azure
/kind bug
/milestone v1.13
/cc @brendandburns @khenidak @andyzhangx

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 31, 2018
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Oct 31, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/azure sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. labels Oct 31, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 31, 2018
@feiskyer
Copy link
Member Author

/retest

Copy link
Member

@andyzhangx andyzhangx left a 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...
Copy link
Member

Choose a reason for hiding this comment

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

read --> ready?

Copy link
Member Author

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.
Copy link
Member

Choose a reason for hiding this comment

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

referring to

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Member

@yastij yastij left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2018
@feiskyer
Copy link
Member Author

/test pull-kubernetes-integration

@yastij
Copy link
Member

yastij commented Oct 31, 2018

@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)

@k8s-ci-robot k8s-ci-robot merged commit dc23974 into kubernetes:master Oct 31, 2018
@feiskyer feiskyer deleted the pip-safe-clean branch November 1, 2018 01:49
k8s-ci-robot added a commit that referenced this pull request Nov 2, 2018
…63-upstream-release-1.12

Automated cherry pick of #70463: Ensure orphan public IPs deleted
k8s-ci-robot added a commit that referenced this pull request Nov 5, 2018
…63-upstream-release-1.10

Automated cherry pick of #70463: Ensure orphan public IPs deleted
k8s-ci-robot added a commit that referenced this pull request Dec 3, 2018
…63-upstream-release-1.11

Automated cherry pick of #70463: Ensure orphan public IPs deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Controller Manager may get stuck in deleting public IP after restart
4 participants