summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-06-12 04:44:45 -0400
committerTim Rozet <trozet@redhat.com>2017-06-12 04:44:45 -0400
commitabb2b6f9008c7661aa0aaeb12a58aeba02106eaa (patch)
tree5f25465a1f5946b8c9a7ef4be725876cce770c56
parentf4f6eeab383e808caa4756fc8c31fe684983b234 (diff)
Fixes vars missing in overcloudrc.v3
Change-Id: I03df4973fe2bb1356719dda5666484f556df2ffa Signed-off-by: Tim Rozet <trozet@redhat.com>
-rwxr-xr-xlib/post-install-functions.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index a93ad54..b3bfbd6 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -163,17 +163,17 @@ fi
# Fix project_id and os_tenant_name not in overcloudrc
# Deprecated openstack client does not need project_id
# and os_tenant_name anymore but glance client and
-# Rally in generall does need it.
+# Rally in general does need it.
# REMOVE when not needed in Rally/glance-client anymore.
-if ! grep -q "OS_PROJECT_ID" ./overcloudrc;then
- project_id=\$(openstack project list |grep admin|awk '{print \$2}')
- echo "export OS_PROJECT_ID=\$project_id" >> ./overcloudrc
-fi
-if ! grep -q "OS_TENANT_NAME" ./overcloudrc;then
- echo "export OS_TENANT_NAME=admin" >> ./overcloudrc
-fi
-
-
+for rcfile in overcloudrc overcloudrc.v3; do
+ if ! grep -q "OS_PROJECT_ID" \$rcfile; then
+ project_id=\$(openstack project list |grep admin|awk '{print \$2}')
+ echo "export OS_PROJECT_ID=\$project_id" >> \$rcfile
+ fi
+ if ! grep -q "OS_TENANT_NAME" \$rcfile; then
+ echo "export OS_TENANT_NAME=admin" >> \$rcfile
+ fi
+done
EOI
# we need to restart neutron-server in Gluon deployments to allow the Gluon core