From b8cad752ff9e3685c3b6490e7a4ef3a6862e3767 Mon Sep 17 00:00:00 2001 From: Nikolas Hermanns Date: Fri, 3 Feb 2017 06:38:52 -0500 Subject: Fixing glance-client and rally Since the project_id is not in the overcloudrc glance clinet is failing. Since os_tenant_name is not in overcloudrc rally setup is failing. Change-Id: Iaec4031d3419e8380fb8789288e587c44d600971 Signed-off-by: Nikolas Hermanns --- lib/post-install-functions.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib') 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 -- cgit 1.2.3-korg