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 standalone VM EnsureBackendPoolDeleted #4217
Fix standalone VM EnsureBackendPoolDeleted #4217
Conversation
f3535a2
to
b00000e
Compare
/retest |
b00000e
to
2582c27
Compare
2582c27
to
452b9c3
Compare
pkg/provider/azure.go
Outdated
@@ -1229,9 +1229,11 @@ func (az *Cloud) updateNodeCaches(prevNode, newNode *v1.Node) { | |||
switch { | |||
case !isNodeManagedByCloudProvider: | |||
az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name) | |||
klog.V(4).Infof("excluding Node %q from LoadBalancer because it is not managed by cloud provider", newNode.ObjectMeta.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will add a lot of logs for large clusters. Can we change it to 6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose 4 because I think the log level should be same with the below logic:
for _, address := range getNodePrivateIPAddresses(newNode) {
if az.nodePrivateIPs[newNode.Name] == nil {
az.nodePrivateIPs[newNode.Name] = sets.New[string]()
}
klog.V(4).Infof("adding IP address %s of the node %s", address, newNode.Name)
az.nodePrivateIPs[newNode.Name].Insert(address)
}
Shall we make all of them 6?
452b9c3
to
ac3c8a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, lzhecheng 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 |
/retest |
ac3c8a9
to
12f271b
Compare
} else { | ||
lbBackendPoolIPConfigsCount := 0 | ||
if utils.IsAutoscalingAKSCluster() { | ||
for _, ipconfig := range *(*lb.BackendAddressPools)[getLBBackendPoolIndex(lb)].BackendIPConfigurations { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can check loadBalancerBackendAddresses as well for nic lb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a good idea but after I tried, it seems not possible.
I found that the LoadBalancerBackendAddress struct in:
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/0e6c0a55c732dad2e4b8b946b234c118259769f4/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2022-07-01/network/models.go
is:
type LoadBalancerBackendAddress struct {
// LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool.
*LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"`
// Name - Name of the backend address.
Name *string `json:"name,omitempty"`
}
It should have ID but actually not. ID is need for autoscaling cluster to avoid taking systempool into consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's in properties.networkInterfaceIPConfiguration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Updated
12f271b
to
ac0a8a2
Compare
* Fix ensureBackendPoolDeleted for standalone VM * Trigger Service reconcile for exclude-from-external-load-balancers e2e test * Refactor e2e * Add logs for exclude-from-external-load-balancers Signed-off-by: Zhecheng Li <zhechengli@microsoft.com>
ac0a8a2
to
3d1b7ca
Compare
/lgtm |
/cherrypick release-1.27 |
@lzhecheng: #4217 failed to apply on top of branch "release-1.27":
In response to this:
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. |
What type of PR is this?
/kind testing
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: