-
Notifications
You must be signed in to change notification settings - Fork 93
Fix PowerVS cluster's load balancer status check #2029
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 PowerVS cluster's load balancer status check #2029
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/cc @Karthik-K-N |
if requeue := s.checkLoadBalancerStatus(*loadBalancer); requeue { | ||
return requeue, nil | ||
if isReady := s.checkLoadBalancerStatus(*loadBalancer); !isReady { | ||
s.V(3).Info("LoadBalancer is still not Active", "name", *loadBalancer.Name, "state", *loadBalancer.ProvisioningStatus) |
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.
*loadbalancer.Name can be nil when user sets only id. so better avoid it.
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 coming from cloud API resp right, would be able to create a LB without 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.
oh yeah, sorry, I overlooked loadbalancer from
for index, loadBalancer := range loadBalancers {
} | ||
|
||
// check VPC load balancer exist in cloud | ||
loadBalancerStatus, err := s.checkLoadBalancer(loadBalancer) |
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.
why is this removed?
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.
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.
s.GetLoadBalancerID(loadBalancer.Name)
just checks only from status not from cloud!
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.
Sry, did not look properly, reverted the changes.
148a645
to
647e9da
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
/assign @Amulyam24 @mkumatag
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
Thank you for the quick fix @dharaneeshvrd!
/hold @KeerthanaAP is doing some testing, will update here once done. |
@dharaneeshvrd I have tried deploying the cluster with your changes and tried to verify the loadbalancer status.
|
Thanks @KeerthanaAP for testing it quickly. |
Need to depend on load balancer's state to set the cluster's ready status instead of using requeue logic which is designed to block the reconciliation.
647e9da
to
87fe803
Compare
@KeerthanaAP Can you please double check this? It is working for me when I tested in local and in the log you have provided for this deployment does not have my changes. |
Checking with @ hamzy about this in slack
Got it earlier will work but there was no gurantee that in case of multiple LBs all will be in Active as we used to return once we found one LB in active. But I think with this change we should be good |
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.
Its been verified and works as expected.
/lgtm
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.
/unhold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharaneeshvrd, mkumatag 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 |
Need to depend on load balancer's state to set the cluster's ready status instead of using requeue logic which is designed to block the reconciliation.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2026
Special notes for your reviewer:
/area provider/ibmcloud
Release note: