-
Notifications
You must be signed in to change notification settings - Fork 272
[release-0.12] Fix panic when OpenStack server is deleted by an external agent #2477
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
[release-0.12] Fix panic when OpenStack server is deleted by an external agent #2477
Conversation
The panic happened because we did not correctly handle that GetInstanceStatus returns a nil server if the server does not exist, rather than a 404 error. We had the same oversight in the OpenStackServer controller. It looks like this would have resulted in recreating the server.
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EmilienM 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 |
@@ -365,6 +365,11 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope | |||
return ctrl.Result{}, err | |||
} | |||
|
|||
result := r.reconcileMachineState(scope, openStackMachine, machine, machineServer) |
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.
given we set the openStackMachine.Status.Addresses
at line 405, shouldn't we keep the reconcileMachineState
after that?
If we don't do that I think we might end up returning the result without the addresses reconciled.
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.
/hold |
@EmilienM @MaysaMacedo How do you want to handle this? We can either merge this and then backport #2478, or create a squashed custom backport and merge them both at once. |
we can merge this and backport your fix |
/lgtm |
This is an automated cherry-pick of #2475
/assign EmilienM