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

DOMachine with missing instance ID is never removed on cluster delete #218

Closed
timoreimann opened this issue Dec 7, 2020 · 2 comments · Fixed by #220
Closed

DOMachine with missing instance ID is never removed on cluster delete #218

timoreimann opened this issue Dec 7, 2020 · 2 comments · Fixed by #220
Assignees

Comments

@timoreimann
Copy link
Contributor

When a Cluster is deleted while a DOMachine does not have have an instance ID attached (which can happen when the create failed for some reason or the control plane never became ready), the delete hangs forever because DOMachineReconciler terminates reconciliation prematurely. The only way to address the matter is to remove the finalizer manually.

I'm not 100% sure how to best solve the issue. One approach I can think of is to remove the DOMachine finalizer if the instance ID is missing.

@prksu
Copy link
Contributor

prksu commented Dec 7, 2020

@timoreimann yeah, i also realized this issue when we discuss about terminal failure.

One approach I can think of is to remove the DOMachine finalizer if the instance ID is missing.

that's true. the solution is to remove the finalizer in this block as well

if droplet == nil {
clusterScope.V(2).Info("Unable to locate droplet instance")
r.Recorder.Eventf(domachine, corev1.EventTypeWarning, "NoInstanceFound", "Skip deleting")
return reconcile.Result{}, nil
}

fyi, capa did something like this
https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/d269842417540c49cffa82a754187d73ffa21e86/controllers/awsmachine_controller.go#L319-L331

@timoreimann
Copy link
Contributor Author

@prksu sweet, I'll assign the ticket to myself and drive the change.

/assign timoreimann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants