summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-07-12 14:36:40 -0400
committerTim Rozet <trozet@redhat.com>2016-07-12 14:36:40 -0400
commit7214274c5938033b51d828e8d0ac1af280cab826 (patch)
tree54718dfdc9e211c2e7f163725c52028cf9242c74
parent23530516f2ceca4f1215140a287016288923ad47 (diff)
Adds SDN Controller IP to overcloudrc file
JIRA: APEX-152 Change-Id: Id64a42531711c53ad453cd176aab2a9773a71811 Signed-off-by: Tim Rozet <trozet@redhat.com>
-rwxr-xr-xlib/post-install-functions.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index e1f121b9..912a2a11 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -64,6 +64,14 @@ EOI
done
fi
+ # TODO fix this when HA SDN controllers are supported
+ if [ "${deploy_options_array['sdn_controller']}" != 'False' ]; then
+ echo -e "${blue}INFO: Finding SDN Controller IP for overcloudrc...${reset}"
+ sdn_controller_ip=$(overcloud_connect controller0 "facter ipaddress_br_ex")
+ echo -e "${blue}INFO: SDN Controller IP is ${sdn_controller_ip} ${reset}"
+ undercloud_connect stack "echo 'export SDN_CONTROLLER_IP=${sdn_controller_ip}' >> /home/stack/overcloudrc"
+ fi
+
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
source overcloudrc
set -o errexit