1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-16 15:10:12 +00:00

Fix check for etcd hosts

This commit is contained in:
galal-hussein
2017-11-27 01:27:39 +02:00
parent b204a2d2ed
commit 50826bf26e

View File

@@ -90,9 +90,11 @@ func (c *Cluster) SetUpHosts() error {
}
func CheckEtcdHostsChanged(kubeCluster, currentCluster *Cluster) error {
etcdChanged := hosts.IsHostListChanged(currentCluster.EtcdHosts, kubeCluster.EtcdHosts)
if etcdChanged {
return fmt.Errorf("Adding or removing Etcd nodes is not supported")
if currentCluster != nil {
etcdChanged := hosts.IsHostListChanged(currentCluster.EtcdHosts, kubeCluster.EtcdHosts)
if etcdChanged {
return fmt.Errorf("Adding or removing Etcd nodes is not supported")
}
}
return nil
}