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

can not force delete machines resources #307

Closed
hchenxa opened this issue Apr 17, 2019 · 6 comments
Closed

can not force delete machines resources #307

hchenxa opened this issue Apr 17, 2019 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hchenxa
Copy link
Contributor

hchenxa commented Apr 17, 2019

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

What did you expect to happen:
I was trying to delete the machine by kubectl delete machine --force --grace-period=0, but find the command will still need the controller's to finish the machine delete operations.
so :

  1. if my controller was delete by mistake, how can I delete the cluster and machine resources.
  2. If my controller can not connect to openstack environment, how can I delete the cluster and machine resources.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api version:
  • Minikube/KIND version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 17, 2019
@hchenxa hchenxa changed the title can not force delete machines can not force delete machines resources Apr 17, 2019
@jichenjc
Copy link
Contributor

  1. the controller is gone, and this is a mistake, maybe just manual delete the nodes ( the VM spawned ) should be ok?
  2. if can't connect to, we should not allow delete resource or it will lead to orphan resource?

@hchenxa
Copy link
Contributor Author

hchenxa commented Apr 18, 2019

thanks for answer.

actually, there did not have VMs created on openstack, so I did not know how to clean up the garbage resources.

@jichenjc
Copy link
Contributor

no VM created and the controller is gone, then every thing is cleaned?

@hchenxa
Copy link
Contributor Author

hchenxa commented Apr 18, 2019

let me clarify the cases here:

Case 1: I tried to use cluster-api to create the VMs on Openstack, but the VM creation failed due to auth failed, so I tried to delete the machine and the cluster but the operations also failed with the same reason of creation.

Case 2: Then I try to delete the machine and cluster resources with the paramemter --force --grace-period=0 but did not help

Case 3: Then I delete the controller to see if it will help, but seems not, the resources can not deleted as well.

@chrigl
Copy link

chrigl commented Apr 26, 2019

@hchenxa As a short term workaround... there are a finalizers on each machine preventing the object to be deleted form etcd as long as the finalizers are there. Removing the finalizers by hand (e.g. kubectl edit machine something) should let Kubernetes remove the Machine entirely.

The longer term issue: There seems to be either a problem in create machine or delete machine, or both, that we need to find and work around.

@hchenxa
Copy link
Contributor Author

hchenxa commented May 5, 2019

closing this as we can remove the finalizers to force delete the resources.

@hchenxa hchenxa closed this as completed May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants