Skip to content

Commit 08e07fb

Browse files
committed
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
1 parent 408b009 commit 08e07fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

openrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
# source openrc [username] [tenantname]
44
#
55
# Configure a set of credentials for $TENANT/$USERNAME:
6-
# Set TENANT to override the default tenant 'demo'
7-
# Set USERNAME to override the default user name 'demo'
6+
# Set OS_TENANT_NAME to override the default tenant 'demo'
7+
# Set OS_USERNAME to override the default user name 'demo'
88
# Set ADMIN_PASSWORD to set the password for 'admin' and 'demo'
99

1010
# NOTE: support for the old NOVA_* novaclient environment variables has
1111
# been removed.
1212

1313
if [[ -n "$1" ]]; then
14-
USERNAME=$1
14+
OS_USERNAME=$1
1515
fi
1616
if [[ -n "$2" ]]; then
17-
TENANT=$2
17+
OS_TENANT_NAME=$2
1818
fi
1919

2020
# Find the other rc files
@@ -27,11 +27,11 @@ source $RC_DIR/stackrc
2727
# term **tenant** as the entity that owns resources. In some places references
2828
# still exist to the original Nova term **project** for this use. Also,
2929
# **tenant_name** is prefered to **tenant_id**.
30-
export OS_TENANT_NAME=${TENANT:-demo}
30+
export OS_TENANT_NAME=${OS_TENANT_NAME:-demo}
3131

3232
# In addition to the owning entity (tenant), nova stores the entity performing
3333
# the action as the **user**.
34-
export OS_USERNAME=${USERNAME:-demo}
34+
export OS_USERNAME=${OS_USERNAME:-demo}
3535

3636
# With Keystone you pass the keystone password instead of an api key.
3737
# Recent versions of novaclient use OS_PASSWORD instead of NOVA_API_KEYs

0 commit comments

Comments
 (0)