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: skip reconcileSharedLoadBalancer if the service is being deleted #1254

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Mar 15, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

When the service is being deleted, ListManagedLBs will return all LBs in the resource group, including unmanaged LBs. These unmanaged ones may be deleted later in the reconcileSharedLoadBalancer. Although this function can only run once, the ccm may restart right after the service was being deleted, so this unexpected scenario may happen. This PR skips the function if the service is being deleted.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: skip reconcileSharedLoadBalancer if the service is being deleted

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nilo19

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 15, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 80.189% when pulling fac209a on nilo19:fix/delete-lb into 76a2a43 on kubernetes-sigs:master.

@nilo19
Copy link
Contributor Author

nilo19 commented Mar 15, 2022

/retest

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks for the fix.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2022
@nilo19
Copy link
Contributor Author

nilo19 commented Mar 16, 2022

/retest

@k8s-ci-robot k8s-ci-robot merged commit 6d49847 into kubernetes-sigs:master Mar 16, 2022
@nilo19 nilo19 deleted the fix/delete-lb branch March 16, 2022 12:47
@nilo19
Copy link
Contributor Author

nilo19 commented Mar 17, 2022

/cherrypick release-0.7

@nilo19
Copy link
Contributor Author

nilo19 commented Mar 17, 2022

/cherrypick release-1.0

@nilo19
Copy link
Contributor Author

nilo19 commented Mar 17, 2022

/cherrypick release-1.1

@nilo19
Copy link
Contributor Author

nilo19 commented Mar 17, 2022

/cherrypick release-1.23

@k8s-infra-cherrypick-robot

@nilo19: #1254 failed to apply on top of branch "release-0.7":

Applying: fix: skip reconcileSharedLoadBalancer if the service is being deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_backoff.go
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
Auto-merging pkg/provider/azure_backoff.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: skip reconcileSharedLoadBalancer if the service is being deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@nilo19: #1254 failed to apply on top of branch "release-1.0":

Applying: fix: skip reconcileSharedLoadBalancer if the service is being deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_backoff.go
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
Auto-merging pkg/provider/azure_backoff.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: skip reconcileSharedLoadBalancer if the service is being deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@nilo19: #1254 failed to apply on top of branch "release-1.1":

Applying: fix: skip reconcileSharedLoadBalancer if the service is being deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_backoff.go
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
Auto-merging pkg/provider/azure_backoff.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: skip reconcileSharedLoadBalancer if the service is being deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@nilo19: #1254 failed to apply on top of branch "release-1.23":

Applying: fix: skip reconcileSharedLoadBalancer if the service is being deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_backoff.go
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
Auto-merging pkg/provider/azure_backoff.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: skip reconcileSharedLoadBalancer if the service is being deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants