labring / sealos

Sealos is a production-ready Kubernetes distribution that provides a one-stop solution for both public and private cloud. You can run any Docker image on sealos, start high availability databases like mysql/pgsql/redis/mongo, develop applications using any Programming language
https://cloud.sealos.io
Apache License 2.0
13.8k stars 2.06k forks source link

failed to delete node #4869

Open lllicg opened 2 months ago

lllicg commented 2 months ago

Sealos Version

5.0.0-beta5

How to reproduce the bug?

1、run cmd sealos apply -f Clusterfile to create k8s. Clusterfile: apiVersion: apps.sealos.io/v1beta1 kind: Cluster metadata: name: default spec: env:

2、modify the Clusterfile and remove ip address 10.19.193.161, to delete node apiVersion: apps.sealos.io/v1beta1 kind: Cluster metadata: name: default spec: env:

3、run cmd sealos apply -f Clusterfile 2024-07-09T11:01:12 warn delete master 10.19.193.161:22 failed cannot get node with ip address 10.19.193.161:22: cannot find host with internal ip 10.19.193.161 2024-07-09T11:01:12 error failed to clean node, exec command if which kubeadm;then kubeadm reset -f -v 0;fi && \ rm -rf /etc/kubernetes/ && \ rm -rf /etc/cni && rm -rf /opt/cni && \ rm -rf /var/lib/etcd && (ip link delete kube-ipvs0 >/dev/null 2>&1 || true) failed, connect error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain 2024-07-09T11:01:12 error failed to clean node, exec command rm -rf $HOME/.kube failed, connect error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain 2024-07-09T11:01:12 info succeeded in deleting master 10.19.193.161:22 2024-07-09T11:01:12 info start to sync lvscare static pod to node: 10.19.193.153:22 master: [10.19.193.224:6443 10.19.193.167:6443] 10.19.193.153:22 2024-07-09T11:01:12 info generator lvscare static pod is success 2024-07-09T11:01:12 info Executing pipeline UndoBootstrap in ScaleProcessor 2024-07-09T11:01:12 error Applied to cluster error: failed to execute remote command /var/lib/sealos/data/default/rootfs/opt/sealctl hosts delete --domain sealos.hub: connect error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain Error: failed to execute remote command /var/lib/sealos/data/default/rootfs/opt/sealctl hosts delete --domain sealos.hub: connect error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

What is the expected behavior?

No response

What do you see instead?

No response

Operating environment

- Sealos version:v5.0.1
- containerd version:v1.7.14
- Kubernetes version:1.27.11

Additional information

No response

bxy4543 commented 1 month ago

It looks like the machine is no longer accessible

yangxggo commented 1 month ago

It looks like the machine is no longer accessible

no, the target node that needs to delete is not existing in the new clusterfile, and it has a different password with others'. In that case, sealos cannot get the right password to connect the target node.

yangxggo commented 1 month ago

/assign