From 2fd47194bd663a74e53971d4da83b306fea2387f Mon Sep 17 00:00:00 2001 From: qiaolei Date: Fri, 31 Jul 2015 21:13:28 +0800 Subject: [PATCH] Initialize global variable MINION_IPS in setClusterInfo function Initialize global variable MINION_IPS in setClusterInfo function. MINION_IPS is defined as a global variable, and is concatenated with other nodeIP. When setClusterInfo is called for many times, this could cause potential problems. Such as, you will have MINION_IPS=192.168.0.2,192.168.0.3,192.168.0.2,192.168.0.3 which is obviously wrong. Update util.sh --- cluster/ubuntu/util.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index 1af80823db..b3bc68c8b7 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -37,6 +37,12 @@ function test-build-release { # From user input set the necessary k8s and etcd configuration infomation function setClusterInfo() { + # Initialize MINION_IPS in setClusterInfo function + # MINION_IPS is defined as a global variable, and is concatenated with other nodeIP + # When setClusterInfo is called for many times, this could cause potential problems + # Such as, you will have MINION_IPS=192.168.0.2,192.168.0.3,192.168.0.2,192.168.0.3 which is obviously wrong + MINION_IPS="" + ii=0 for i in $nodes do