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: remove lb from vmss when the backend pool is empty #2721

Merged
merged 1 commit into from Nov 17, 2022

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Nov 9, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

safeDeleteLoadBalancer uses isLBBackendPoolTypeIPConfig to determine if we should call vmSet.EnsureBackendPoolDeleted, because for IP-based backend pools, we don't need to decouple the vmss from the lb before we delete the lb. But isLBBackendPoolTypeIPConfig cannot tell the backend pool type if it is empty. In this case, the lb cannot be deleted if the vmss (not the vmss vms) is still referencing the lb. This PR removes the check. If the backend pool is IP-based, vmSet.EnsureBackendPoolDeleted will be a no-op.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: remove lb from vmss when the backend pool is empty

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. labels Nov 9, 2022
@nilo19 nilo19 changed the title fix: remove lb from vmss when the backend pool is empty [WIP] fix: remove lb from vmss when the backend pool is empty Nov 9, 2022
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 9, 2022
@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for kubernetes-sigs-cloud-provide-azure canceled.

Name Link
🔨 Latest commit a3541e0
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cloud-provide-azure/deploys/6374d987df3356000783c5f7

@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 Nov 9, 2022
@coveralls
Copy link

coveralls commented Nov 9, 2022

Coverage Status

Coverage decreased (-0.004%) to 79.659% when pulling a3541e0 on nilo19:chore/scale-0-e2e into f22ac73 on kubernetes-sigs:master.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2022
@nilo19 nilo19 changed the title [WIP] fix: remove lb from vmss when the backend pool is empty fix: remove lb from vmss when the backend pool is empty Nov 16, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 16, 2022
@bridgetkromhout
Copy link

/retest

1 similar comment
@nilo19
Copy link
Contributor Author

nilo19 commented Nov 17, 2022

/retest

@jwtty
Copy link
Member

jwtty commented Nov 17, 2022

/lgtm

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

nilo19 commented Nov 17, 2022

/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz

@k8s-ci-robot k8s-ci-robot merged commit a454d33 into kubernetes-sigs:master Nov 17, 2022
@nilo19 nilo19 deleted the chore/scale-0-e2e branch November 18, 2022 01:59
@nilo19
Copy link
Contributor Author

nilo19 commented Nov 18, 2022

/cherrypick release-1.1

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 18, 2022

/cherrypick release-1.23

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 18, 2022

/cherrypick release-1.24

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 18, 2022

/cherrypick release-1.25

@k8s-infra-cherrypick-robot

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

Applying: fix: remove lb from vmss when the backend pool is empty
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_utils.go
M	pkg/provider/azure_vmss.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmss.go
CONFLICT (content): Merge conflict in pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_utils.go
CONFLICT (content): Merge conflict in pkg/provider/azure_utils.go
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
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: remove lb from vmss when the backend pool is empty
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: #2721 failed to apply on top of branch "release-1.23":

Applying: fix: remove lb from vmss when the backend pool is empty
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_utils.go
M	pkg/provider/azure_vmss.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmss.go
CONFLICT (content): Merge conflict in pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_utils.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.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: remove lb from vmss when the backend pool is empty
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.

@k8s-infra-cherrypick-robot

@nilo19: #2721 failed to apply on top of branch "release-1.24":

Applying: fix: remove lb from vmss when the backend pool is empty
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_vmss.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmss.go
CONFLICT (content): Merge conflict in pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.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: remove lb from vmss when the backend pool is empty
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.24

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: #2721 failed to apply on top of branch "release-1.25":

Applying: fix: remove lb from vmss when the backend pool is empty
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_vmss.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmss.go
CONFLICT (content): Merge conflict in pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.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: remove lb from vmss when the backend pool is empty
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.25

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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants