Always use controller from environment 1 99/17499/1
authorDimitri Mazmanov <dimitri.mazmanov@ericsson.com>
Mon, 25 Jul 2016 13:17:17 +0000 (15:17 +0200)
committerDimitri Mazmanov <dimitri.mazmanov@ericsson.com>
Mon, 25 Jul 2016 13:20:19 +0000 (15:20 +0200)
In case of multiregion fuel deployments (which is implemented using fuel
environments), always use a controller from the first environment
(RegionOne), as for multisite RegionOne is the master region.
This fix will not affect single region deployments, because the -env 1
property will result in the same single output.

Signed-off-by: Dimitri Mazmanov <dimitri.mazmanov@ericsson.com>
utils/fetch_os_creds.sh

index c240976..88e964b 100755 (executable)
@@ -82,7 +82,7 @@ if [ "$installer_type" == "fuel" ]; then
 
     # Check if controller is alive (online='True')
     controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
-        'fuel node | grep controller | grep "True\|  1" | awk -F\| "{print \$5}" | tail -1' | \
+        'fuel node -env 1 | grep controller | grep "True\|  1" | awk -F\| "{print \$5}" | tail -1' | \
         sed 's/ //g') &> /dev/null
 
     if [ -z $controller_ip ]; then