-
Notifications
You must be signed in to change notification settings - Fork 257
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
🐛 Wait and requeue if LB not deleted #2122
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/hold |
/hold cancel |
/test pull-cluster-api-provider-openstack-e2e-test |
/lgtm |
a25a574
to
000fbaf
Compare
@mdbooth ready for review when time permits. Maybe over-engineered but it does the job apparently. Feedback is open. |
c966280
to
9705a4f
Compare
@mdbooth what to do with this one? It's been open for a long time. |
What state did we leave it in? Is it about ready to go? |
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 should remove the unnecessary check, but apart from that this is good to go imho.
@@ -658,32 +665,86 @@ func (s *Service) ReconcileLoadBalancerMember(openStackCluster *infrav1.OpenStac | |||
return nil | |||
} | |||
|
|||
func (s *Service) DeleteLoadBalancer(openStackCluster *infrav1.OpenStackCluster, clusterResourceName string) error { | |||
func (s *Service) checkIfLbPortsExist(openStackCluster *infrav1.OpenStackCluster) (bool, error) { |
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.
See below: we don't need this any more. In the context of the other fix (waiting until the LB is gone) this results in unnecessary API calls. It also depends on internal Octavia implementation details which aren't part of the API, so it adds additional future failure modes without any benefit. I'd very much prefer we removed this and the new function in port.go
.
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.
The change in port.go
was to address #2121 - I'm not sure that removing it will fix the issue with just the reconcile because it takes a few seconds for Octavia to remove ports when LB is being deleted but we'll see.
/hold cancel |
If the LB that is being deleted when a cluster is deleted, it'll go through the PENDING_DELETE state and at this stage there is nothing we can do but wait for the LB to be actually deleted. If the LB is in that state during the deletion, let's just return no error but request a reconcile after some time.
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mdbooth 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 |
What this PR does / why we need it:
If the LB that is being deleted when a cluster is deleted, it'll go
through the PENDING_DELETE state and at this stage there is nothing we
can do but wait for the LB to be actually deleted.
If the LB is in that state during the deletion, let's just return no
error but request a reconcile after some time.
Which issue(s) this PR fixes:
Fixes #2124
Fixes #2121