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

Fix a bug for etcd removal machine controller [Etcd Proxy] #125

Merged
merged 1 commit into from
May 29, 2024

Conversation

nasusoba
Copy link
Contributor

Bug found
The cluster cannot be deleted if the user first scale down a cluster, and then delete it. The deletion process got stuck

Why

  • When the cluster is scaling down, a machine is deleted, with PreTerminateDeleteHookAnnotationPrefix set
  • Machine controller set the etcd.k3s.cattle.io/remove to that node, waiting for the etcd.k3s.cattle.io/removed-node-name to be set
  • User triggered the deletion to the whole cluster, which deletes other healthy control plane
  • Machine controller could not check etcd.k3s.cattle.io/removed-node-name annotation, as the whole cluster is down. And it stuck forever, with the machine not deleted

Fix
Before machine controller remove an etcd member, it will check if the cluster/cp is already under deletion, or if the removed machine is the last node, or if the machine has no noderef. If so, it will skip etcd removal.

@mogliang mogliang merged commit 50e7c28 into k3s-io:main May 29, 2024
5 checks passed
@nasusoba nasusoba deleted the etcdproxy branch May 29, 2024 04:59
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 this pull request may close these issues.

2 participants