From 543ccac9c57847695cb038d6153cf782b499491a Mon Sep 17 00:00:00 2001 From: xudan Date: Tue, 2 Jan 2018 02:12:30 -0500 Subject: [PATCH] Bugfix: use fuel public endpoint rather than internal one 1. The internal endpoint url of fuel is http. 2. Dovetail won't pass cacert to functest and yardstick containers if it's http. 3. For functest and rally, even if it uses internal url in the openrc file, they will still use public one somewhere. 4. Use fuel public endpoint which is https, so all containers will work with the cacert. Change-Id: I3326c8d66bcad44ea81169ce0938cb0e247f498c Signed-off-by: xudan --- jjb/dovetail/dovetail-run.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index cccc55f12..80c9929db 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -185,6 +185,7 @@ dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}" DOCKER_REPO='opnfv/dovetail' if [ "$(uname -m)" = 'aarch64' ]; then DOCKER_REPO="${DOCKER_REPO}_$(uname -m)" + DOCKER_TAG="latest" fi echo "Dovetail: Pulling image ${DOCKER_REPO}:${DOCKER_TAG}" @@ -213,6 +214,15 @@ if [ $(docker ps | grep "${DOCKER_REPO}:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi +if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + source_cmd="source ${OPENRC}" + get_public_url_cmd="openstack --insecure endpoint list --service keystone --interface public | sed -n 4p | awk '{print \$14}'" + public_url=$(sudo docker exec "$container_id" /bin/bash -c "${source_cmd} && ${get_public_url_cmd}") + sed -i 's#OS_AUTH_URL=.*#OS_AUTH_URL='"${public_url}"'#g' ${OPENRC} + sed -i 's/internal/public/g' ${OPENRC} + cat ${OPENRC} +fi + # Modify tempest_conf.yaml file tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then -- 2.16.6