From ea022e31a3d73b1706af0bd0e22ecf7fced8848f Mon Sep 17 00:00:00 2001 From: Ekaterina Chernova Date: Thu, 12 Jul 2018 16:25:38 +0300 Subject: [PATCH] Get back check for add master node count --- kqueen/engines/openstack_kubespray.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kqueen/engines/openstack_kubespray.py b/kqueen/engines/openstack_kubespray.py index b27c1bad..003c8dc8 100644 --- a/kqueen/engines/openstack_kubespray.py +++ b/kqueen/engines/openstack_kubespray.py @@ -610,7 +610,10 @@ def validate_ip(address): ipaddress.ip_address(address) return address - self.meta["master_count"] = self.cluster.metadata["master_count"] + mc = self.cluster.metadata["master_count"] + if mc % 2 == 0: + raise ValueError("Master node count must be an odd number at least 3 or greater") + self.meta["master_count"] = mc self.meta["slave_count"] = self.cluster.metadata["slave_count"] self.meta["dns"] = [validate_ip(ip) for ip in