From bcdce9ea12a5a0613936bbfdc13f43f7f0c13d97 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 24 Jun 2014 15:06:02 +1000 Subject: [PATCH] Handle failure of openstack endpoint Change 4f7bf6963a1e9ae03bc0ae9189874cba561ad62f introduced finding the endpoint via "openstack endpoint show" only. Previously that output was piped through grep, etc. so it handled fell back to a blank output when the endpoints were not available. Ignore failures of this command so the blank output is matched Change-Id: Iae2f09784ffa38efd2f858513bf284c84c32edac --- tools/create_userrc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/create_userrc.sh b/tools/create_userrc.sh index a34ad287f8..5b1111ae54 100755 --- a/tools/create_userrc.sh +++ b/tools/create_userrc.sh @@ -126,12 +126,12 @@ fi export -n SERVICE_TOKEN SERVICE_ENDPOINT OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT -EC2_URL=$(openstack endpoint show -f value -c publicurl ec2) +EC2_URL=$(openstack endpoint show -f value -c publicurl ec2 || true) if [[ -z $EC2_URL ]]; then EC2_URL=http://localhost:8773/services/Cloud fi -S3_URL=$(openstack endpoint show -f value -c publicurl s3) +S3_URL=$(openstack endpoint show -f value -c publicurl s3 || true) if [[ -z $S3_URL ]]; then S3_URL=http://localhost:3333 fi