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 removing nics from lb if there will be no nics in the backe… #3212

Merged
merged 1 commit into from Jan 28, 2023

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Jan 20, 2023

…nd pool

What type of PR is this?

/kind bug

What this PR does / why we need it:

We used to remove the nics from the lb backend pool if the corresponding VM is not ready. However, if all nodes in the pool go into not ready state at a time, the connection will be completely lost. This PR skips the removal if the backend pool will be empty after the operation. If the vms are not found, the nics will be removed, even if the pool will be empty, because in this case the nics are not supposed to exist any more.

The manual removal by the node label node.kubernetes.io/exclude-from-external-load-balancers=true will also be ignored in this case.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: skip removing nics from lb if there will be no nics in the backend pool

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. labels Jan 20, 2023
@netlify
Copy link

netlify bot commented Jan 20, 2023

Deploy Preview for kubernetes-sigs-cloud-provide-azure ready!

Name Link
🔨 Latest commit 0acc418
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cloud-provide-azure/deploys/63ca11c41686a90008361e23
😎 Deploy Preview https://deploy-preview-3212--kubernetes-sigs-cloud-provide-azure.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2023
@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 Jan 20, 2023
@MartinForReal
Copy link
Contributor

/retest

2 similar comments
@nilo19
Copy link
Contributor Author

nilo19 commented Jan 20, 2023

/retest

@MartinForReal
Copy link
Contributor

/retest

@feiskyer
Copy link
Member

Thanks for the fix

/lgtm

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

nilo19 commented Jan 28, 2023

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

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

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

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

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

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/retest

1 similar comment
@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/retest

@k8s-ci-robot k8s-ci-robot merged commit 588cff6 into kubernetes-sigs:master Jan 28, 2023
@nilo19 nilo19 deleted the fix/not-ready branch January 28, 2023 12:43
@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/cherrypick release-1.23

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/cherrypick release-1.24

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/cherrypick release-1.25

@nilo19
Copy link
Contributor Author

nilo19 commented Jan 28, 2023

/cherrypick release-1.26

@k8s-infra-cherrypick-robot

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

Applying: fix: skip removing nics from lb if there will be no nics in the backend pool
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer_backendpool.go
M	pkg/provider/azure_loadbalancer_backendpool_test.go
M	tests/e2e/network/ensureloadbalancer.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/ensureloadbalancer.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool_test.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool.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 removing nics from lb if there will be no nics in the backend pool
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: #3212 failed to apply on top of branch "release-1.24":

Applying: fix: skip removing nics from lb if there will be no nics in the backend pool
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer_backendpool.go
M	pkg/provider/azure_loadbalancer_backendpool_test.go
M	tests/e2e/network/ensureloadbalancer.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/ensureloadbalancer.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool_test.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool.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 removing nics from lb if there will be no nics in the backend pool
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: #3212 failed to apply on top of branch "release-1.25":

Applying: fix: skip removing nics from lb if there will be no nics in the backend pool
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer_backendpool.go
M	pkg/provider/azure_loadbalancer_backendpool_test.go
M	tests/e2e/network/ensureloadbalancer.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/ensureloadbalancer.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool_test.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool.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 removing nics from lb if there will be no nics in the backend pool
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.

@k8s-infra-cherrypick-robot

@nilo19: #3212 failed to apply on top of branch "release-1.26":

Applying: fix: skip removing nics from lb if there will be no nics in the backend pool
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer_backendpool.go
M	pkg/provider/azure_loadbalancer_backendpool_test.go
M	tests/e2e/network/ensureloadbalancer.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/ensureloadbalancer.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool_test.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer_backendpool.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 removing nics from lb if there will be no nics in the backend pool
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.26

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-ci-robot added a commit that referenced this pull request Jan 30, 2023
[release-1.23] cherry pick #3212 and #3232 to release-1.23
k8s-ci-robot added a commit that referenced this pull request Jan 30, 2023
[release-1.25] cherry pick #3212 and #3232 to release-1.25
k8s-ci-robot added a commit that referenced this pull request Jan 30, 2023
[release-1.24] cherry pick #3212 and #3232 to release-1.24
k8s-ci-robot added a commit that referenced this pull request Jan 30, 2023
[release-1.26] cherry pick #3212 and #3232 to release-1.25
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/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.

None yet

5 participants