From 08e07fb4c817796db06bf8b90982c3b7cc5c41f2 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 28 Mar 2012 15:23:58 -0400 Subject: [PATCH] Don't use $USERNAME in openrc. Fix bug 967429. Don't use $USERNAME as a variable in openrc. It's commonly set by default and can result in $OS_USERNAME getting set to something else unexpectedly, resulting in an environment that doesn't work. Change-Id: I6083a871209d30c81ca6876b1ef6c154aef7f598 --- openrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openrc b/openrc index 7aefb0ffd3..be7850b5fa 100644 --- a/openrc +++ b/openrc @@ -3,18 +3,18 @@ # source openrc [username] [tenantname] # # Configure a set of credentials for $TENANT/$USERNAME: -# Set TENANT to override the default tenant 'demo' -# Set USERNAME to override the default user name 'demo' +# Set OS_TENANT_NAME to override the default tenant 'demo' +# Set OS_USERNAME to override the default user name 'demo' # Set ADMIN_PASSWORD to set the password for 'admin' and 'demo' # NOTE: support for the old NOVA_* novaclient environment variables has # been removed. if [[ -n "$1" ]]; then - USERNAME=$1 + OS_USERNAME=$1 fi if [[ -n "$2" ]]; then - TENANT=$2 + OS_TENANT_NAME=$2 fi # Find the other rc files @@ -27,11 +27,11 @@ source $RC_DIR/stackrc # term **tenant** as the entity that owns resources. In some places references # still exist to the original Nova term **project** for this use. Also, # **tenant_name** is prefered to **tenant_id**. -export OS_TENANT_NAME=${TENANT:-demo} +export OS_TENANT_NAME=${OS_TENANT_NAME:-demo} # In addition to the owning entity (tenant), nova stores the entity performing # the action as the **user**. -export OS_USERNAME=${USERNAME:-demo} +export OS_USERNAME=${OS_USERNAME:-demo} # With Keystone you pass the keystone password instead of an api key. # Recent versions of novaclient use OS_PASSWORD instead of NOVA_API_KEYs