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

Issue 4230: remove readiness check for cache exclusion #4234

Merged

Conversation

alexanderConstantinescu
Copy link
Contributor

@alexanderConstantinescu alexanderConstantinescu commented Jul 5, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Issue #4230 explains things in greater depth, but here's the TL;DR

kubernetes/kubernetes#109706 stopped syncing load balancers when changes are observed to the readiness state of the Node object. Load balancers are essentially almost only re-synced whenever a Node is: added, deleted, has the exclusion label added. The service controller expectation is that the cloud-providers just accept the list of nodes provided through the UpdateLoadBalancerHost call and try to configure the load balancers with the entire set of nodes provided. Given that Azure performs additional filtering of the nodes and excludes NotReady nodes, there will be situations where the node which just transitioned to Ready isn't added to the load balancer node set, because the service controller doesn't re-sync load balancers due to the readiness state change.

This patch removes this additional filtering of the readiness state so that all NotReady nodes get added to the load balancer set. The health check probes used by the load balancer will then determine which nodes should be used for traffic load balancing.

Please have a look at the referenced enhancement proposal which merged in 1.26: kubernetes/enhancements#3458

/cc @JoelSpeed

Which issue(s) this PR fixes:

Fixes #4230

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fixes issue 4230 and removes the additional filtering on `NotReady` nodes by the azure cloud provider code 

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

https://github.com/kubernetes/enhancements/issues/3458

@k8s-ci-robot k8s-ci-robot requested a review from JoelSpeed July 5, 2023 17:34
@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 Jul 5, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @alexanderConstantinescu!

It looks like this is your first PR to kubernetes-sigs/cloud-provider-azure 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cloud-provider-azure has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 5, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @alexanderConstantinescu. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 5, 2023
@alexanderConstantinescu
Copy link
Contributor Author

This will need back-ports to release-1.26 and release-1.27

@feiskyer
Copy link
Member

feiskyer commented Jul 6, 2023

Thanks for the PR!
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 6, 2023
@alexanderConstantinescu
Copy link
Contributor Author

@feiskyer what's the back-port process for AKS? I guess I need to file a PR to master in https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/legacy-cloud-providers/azure ? And then back-port that to release-1.26 / release-1.27? Or is everything done in this repo?

@JoelSpeed
Copy link
Contributor

Changes LGTM based on my understanding of the code and changes reported in the linked issue
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2023
@alexanderConstantinescu
Copy link
Contributor Author

@feiskyer : could you please have a look at this quite soon? AKS has released several versions of 1.26 with this bug, and it's a pretty important one since it's really easy to trigger and and cause a complete downtime for any ETP:Local services on the cluster

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
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexanderConstantinescu, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2023
@feiskyer
Copy link
Member

/cherry-pick release-1.26

@k8s-infra-cherrypick-robot

@feiskyer: once the present PR merges, I will cherry-pick it on top of release-1.26 in a new PR and assign it to you.

In response to this:

/cherry-pick 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.

@feiskyer
Copy link
Member

/cherry-pick release-1.27

@k8s-infra-cherrypick-robot

@feiskyer: once the present PR merges, I will cherry-pick it on top of release-1.27 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.27

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 k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2023
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2023
@feiskyer feiskyer added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2023
@feiskyer
Copy link
Member

feiskyer commented Jul 13, 2023

Rebased due to conflicts and added lgtm label back.

@feiskyer
Copy link
Member

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

@k8s-ci-robot k8s-ci-robot merged commit 9813c3b into kubernetes-sigs:master Jul 13, 2023
@k8s-infra-cherrypick-robot

@feiskyer: #4234 failed to apply on top of branch "release-1.26":

Applying: Issue 4230: remove readiness check for cache exclusion
Using index info to reconstruct a base tree...
M	pkg/provider/azure.go
M	pkg/provider/azure_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_test.go
Auto-merging pkg/provider/azure.go
CONFLICT (content): Merge conflict in pkg/provider/azure.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 Issue 4230: remove readiness check for cache exclusion
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:

/cherry-pick 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-infra-cherrypick-robot

@feiskyer: #4234 failed to apply on top of branch "release-1.27":

Applying: Issue 4230: remove readiness check for cache exclusion
Using index info to reconstruct a base tree...
M	pkg/provider/azure.go
M	pkg/provider/azure_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_test.go
Auto-merging pkg/provider/azure.go
CONFLICT (content): Merge conflict in pkg/provider/azure.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 Issue 4230: remove readiness check for cache exclusion
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:

/cherry-pick release-1.27

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.

@aaron-trout
Copy link

aaron-trout commented Aug 4, 2023

Hi @feiskyer, are you able to confirm which AKS releases this has/will make it's way into? I see there was one 18 hours ago: https://github.com/Azure/AKS/releases/tag/2023-07-30

Thanks!

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Load Balancer Node membership not being updated for externalTrafficPolicy Local
6 participants