-
Notifications
You must be signed in to change notification settings - Fork 716
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
No way to recover failed master node #2138
Comments
/triage support
|
@fabriziopandini Thank you for your reply. This allows me to recover the cluster manually. I additionally found that for an update in place, editing the configmap was not needed. I need only remove the ETCd member before running the join command again. I would however have naively expected kubeadm join, when run again with the same node name (and possibly IP), to replace the etcd instance... |
this opens the question whether kubeadm should remove existing eetcd members with the same URL in the etcd cluster. my initial reaction would be no. similarly, later versions of kubeadm do not allow you to join a k8s node with the same name as this is disruptive to the existing cluster. the etcdctl maintenance / interaction here seems appropriate for removal of the existing etcd member, but i'd like to hear more opinions about this. |
@neolit123 if I may add "manual intervention sucks!" to the discussion... (Then I will be quiet and let others weigh in!) |
hi, how are you destroying the second master to simulate node failure? |
@neolit123 I have created all three nodes in a single multi-box Vagrantfile. Destruction of the box was done with the command When the machine is recreated with the command Running the kubectl command to remove it from the API was just an unsuccessful ditch attempt at enabling the join command to work again. |
understood, [1] if the node is wiped completely,
this log line is not relevant as later
ideally yes, but it's not very simple and needs design / evaluation - e.g. if an etcd member from an IP is joining but a member with the same IP already exists, is kubeadm supposed to auto-delete that existing member? more discussion on #2095, so i suggest you follow that and we can close this ticket. but given [1], manual intervention is already a fact. |
@neolit123 Thank you for taking the time to address this one! I apologize: I definitely do not wish to appear contradictory, but I shall mention this only in the spirit of being a good tester ^_^
If this is the expected behaviour, then it is functioning incorrectly, for I am able to rejoin a completely new node with the same name and IP without touching I agree with your prognosis on foot shooting: The two options that I might suggest, which would fit the recovery in place use-case are: kubeadm join --allow-rejoin # Will kill ETCd pod if present on that hostname. kubeadm remove --node-id <some remote node> # Will delete node and remove ETCd pod |
what is the full output of
related to the etcd idempotency topic, please make your proposals to the issue that i linked, so that others can see it too.
it is out of scope for a kubeadm command to delete the Node object. |
The replacement node is called root@master3:/home/vagrant# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master1.vagrant Ready master 23h v1.18.2
master2.vagrant NotReady master 12h v1.18.2
master3.vagrant Ready master 23h v1.18.2
worker1.vagrant NotReady <none> 23h v1.18.2
worker2.vagrant Ready <none> 23h v1.18.2
worker3.vagrant Ready <none> 23h v1.18.2
|
ok, so i forgot an important detail:
it only fails if the existing node is Ready, so in your case this is working as expected for the node "master2.vagrant". the idea is to not break existing Ready (working) nodes with "join". |
What keywords did you search in kubeadm issues before filing this one?
HA ETCd join rejoin control-plane [master node failure] [master node recreation]
Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
Versions
kubeadm version (use
kubeadm version
):Environment:
kubectl version
):uname -a
):Linux master2.vagrant 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
docker version
19.03.8
What happened? / What you expected to happen?
I have set up three master nodes using kubeadm. The API is sat behind HAProxy in TCP mode.
This was unsuccessful.
How to reproduce it (as minimally and precisely as possible)?
HAProxy in TCP mode round-robins requests to
control.vagrant:6443
to port6443
on the master nodes.On the first master node I used the command
To initiate the cluster. I then joined masters 2 and 3 using (minor variations on) the following command:
This successfully creates a cluster of three master nodes, which works perfectly as expected.
When I destroy the second master,
master2
, to simulate node failure. I find myself unable to re-add it as a master node (with the previous join command). The hostname (master2.vagrant
) and the IP10.0.0.12
are now completely useless for re-adding master nodes.Anything else we need to know?
15826 etcd.go:480] Failed to get etcd status for https://10.0.0.12:2379: failed to dial endpoint https://10.0.0.12:2379 with maintenance client: context deadline exceeded
kubectl delete node master2
on either of the other master nodes between the failure and the recovery.Why this matters enough to report it
The IP addresses, in the environment we are actually running the real thing in, are not flexible. If we can not recreate a master node "in place" we are not able to recover from master node failure.
Even if the fixed IPs were not an issue, service discovery to join
master4, 5, 6...
would be a considerable overhead.The text was updated successfully, but these errors were encountered: