X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fpost-install-functions.sh;h=55b4fe4d1742255f06c0d323275b4753d931e894;hb=b8cad752ff9e3685c3b6490e7a4ef3a6862e3767;hp=eab17407c6ab2342d891742b5933bf136981d7a5;hpb=93aba2bc54c77f14ff77c78be4da0f7d5131162e;p=apex.git diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh index eab17407..55b4fe4d 100755 --- a/lib/post-install-functions.sh +++ b/lib/post-install-functions.sh @@ -107,14 +107,14 @@ fi echo "Removing sahara endpoint and service" sahara_service_id=\$(openstack service list | grep sahara | cut -d ' ' -f 2) sahara_endpoint_id=\$(openstack endpoint list | grep sahara | cut -d ' ' -f 2) -openstack endpoint delete \$sahara_endpoint_id -openstack service delete \$sahara_service_id +[[ -n "\$sahara_endpoint_id" ]] && openstack endpoint delete \$sahara_endpoint_id +[[ -n "\$sahara_service_id" ]] && openstack service delete \$sahara_service_id echo "Removing swift endpoint and service" swift_service_id=\$(openstack service list | grep swift | cut -d ' ' -f 2) swift_endpoint_id=\$(openstack endpoint list | grep swift | cut -d ' ' -f 2) -openstack endpoint delete \$swift_endpoint_id -openstack service delete \$swift_service_id +[[ -n "\$swift_endpoint_id" ]] && openstack endpoint delete \$swift_endpoint_id +[[ -n "\$swift_service_id" ]] && openstack service delete \$swift_service_id if [ "${deploy_options_array['dataplane']}" == 'fdio' ] || [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then for flavor in \$(openstack flavor list -c Name -f value); do @@ -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 @@ -221,7 +237,7 @@ done # Print out the undercloud IP and dashboard URL source stackrc echo "Undercloud IP: $UNDERCLOUD, please connect by doing 'opnfv-util undercloud'" -echo "Overcloud dashboard available at http://\$(openstack stack output show overcloud PublicVip | sed 's/"//g')/dashboard" +echo "Overcloud dashboard available at http://\$(openstack stack output show overcloud PublicVip -f json | jq -r .output_value)/dashboard" EOI if [[ "$ha_enabled" == 'True' ]]; then