diff options
author | 2017-08-24 17:24:06 +0200 | |
---|---|---|
committer | 2017-08-24 17:28:47 +0200 | |
commit | 9980e24afca2ca8bd6807a4a6f5421b0a6f0e95b (patch) | |
tree | a481d3f96de73ac88be240464e84a061122da8b6 /utils | |
parent | 1ee5712c4535807e90111c4a675404b1e17ebab9 (diff) |
utils/fetch_os_creds.sh: Fuel: Robust creds fetch
In case ctl01 node is down, the current mechanism will return
invalid data (the string "Minion") instead of a valid controller IP.
Since "keystonercv3" is present on all controller nodes at </root>,
adjust the credentials fetch to use the first online controller node.
Change-Id: I4ba15bb40d465b112c5e9fc827e3e2a69e671b26
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/fetch_os_creds.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 8374edbbd..312e1ac5c 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -107,7 +107,7 @@ if [ "$installer_type" == "fuel" ]; then # retrieving controller vip controller_ip=$(ssh 2>/dev/null ${ssh_options} ubuntu@${installer_ip} \ - "sudo salt --out txt 'ctl01*' pillar.get _param:openstack_control_address | awk '{print \$2}'" | \ + "sudo salt --out txt 'ctl*' pillar.get _param:openstack_control_address | awk '{print \$2; exit}'" | \ sed 's/ //g') &> /dev/null info "Fetching rc file from controller $controller_ip..." |