summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/post-install-functions.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index 51287c4b..55b4fe4d 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -148,6 +148,22 @@ if [ "${deploy_options_array['congress']}" == 'NeverTrue' ]; then
echo "WARN: Datsource: doctor could NOT be created"
fi
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.
+# 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
+
+
EOI
# for virtual, we NAT external network through Undercloud