From 9bfabc68c4ff2094ed8463b11382d6982743b768 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 20 Apr 2017 15:11:43 -0400 Subject: [PATCH] Make openrc more robust for grenade scenarios This makes openrc more robust for the grenade scenarios by having a sane fallback when stackrc is not found. Change-Id: I297ba519d581d2b6fb4d80d59434acace054bada --- openrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openrc b/openrc index 4cdb50efef..b748055be1 100644 --- a/openrc +++ b/openrc @@ -82,7 +82,12 @@ export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-3} # the user/project has access to - including nova, glance, keystone, swift, ... # We currently recommend using the version 3 *identity api*. # -export OS_AUTH_URL=$KEYSTONE_AUTH_URI + +# If you don't have a working .stackenv, this is the backup possition +KEYSTONE_BACKUP=$SERVICE_PROTOCOL://$SERVICE_HOST:5000 +KEYSTONE_AUTH_URI=${KEYSTONE_AUTH_URI:-$KEYSTONE_BACKUP} + +export OS_AUTH_URL=${OS_AUTH_URL:-$KEYSTONE_AUTH_URI} # Currently, in order to use openstackclient with Identity API v3, # we need to set the domain which the user and project belong to.