1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-25 14:48:06 +00:00

Don't remove Ready nodes during restore

This commit is contained in:
moelsayed
2019-01-04 21:42:26 +02:00
committed by Alena Prokharchyk
parent c6a60bfd83
commit 2bf2cd8f5b

View File

@@ -85,6 +85,9 @@ func (c *Cluster) RemoveOldNodes(ctx context.Context) error {
}
uniqueHosts := hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts)
for _, node := range nodeList.Items {
if k8s.IsNodeReady(node) {
continue
}
host := &hosts.Host{}
host.HostnameOverride = node.Name
if !hosts.IsNodeInList(host, uniqueHosts) {