From 2bf2cd8f5bc59f70c383b15375c448c519a9f363 Mon Sep 17 00:00:00 2001 From: moelsayed Date: Fri, 4 Jan 2019 21:42:26 +0200 Subject: [PATCH] Don't remove Ready nodes during restore --- cluster/remove.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cluster/remove.go b/cluster/remove.go index 9afcaf10..d310c9ad 100644 --- a/cluster/remove.go +++ b/cluster/remove.go @@ -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) {