Fix account rc files creation for Swift users
Id02ebdfa5cb3f6c763293876c6bb031184ebd663 introduced a small regression which makes the command x509-create-cert fail with 'ERROR (CommandError): Invalid OpenStack Nova credentials.' for Swift users. The handling of specific password for Swift users was introduced in Ifb57a43aad439ffe041e98465719a8a8eceae544 Change-Id: I3f328b1358bad0bdf7056796eabfe846dd5bae3a
This commit is contained in:
parent
af03045726
commit
7c6d005eed
@ -557,9 +557,11 @@ function create_swift_disk {
|
|||||||
|
|
||||||
function create_swift_accounts {
|
function create_swift_accounts {
|
||||||
# Defines specific passwords used by tools/create_userrc.sh
|
# Defines specific passwords used by tools/create_userrc.sh
|
||||||
local swiftusertest1_password=testing
|
# As these variables are used by create_userrc.sh, they must be exported
|
||||||
local swiftusertest2_password=testing2
|
# The _password suffix is expected by create_userrc.sh
|
||||||
local swiftusertest3_password=testing3
|
export swiftusertest1_password=testing
|
||||||
|
export swiftusertest2_password=testing2
|
||||||
|
export swiftusertest3_password=testing3
|
||||||
|
|
||||||
KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql}
|
KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql}
|
||||||
|
|
||||||
|
@ -254,7 +254,8 @@ if [ $MODE != "create" ]; then
|
|||||||
|
|
||||||
# Checks for a specific password defined for an user.
|
# Checks for a specific password defined for an user.
|
||||||
# Example for an username johndoe: JOHNDOE_PASSWORD=1234
|
# Example for an username johndoe: JOHNDOE_PASSWORD=1234
|
||||||
eval SPECIFIC_UPASSWORD="\$${USER_NAME^^}_PASSWORD"
|
# This mechanism is used by lib/swift
|
||||||
|
eval SPECIFIC_UPASSWORD="\$${user_name}_password"
|
||||||
if [ -n "$SPECIFIC_UPASSWORD" ]; then
|
if [ -n "$SPECIFIC_UPASSWORD" ]; then
|
||||||
USER_PASS=$SPECIFIC_UPASSWORD
|
USER_PASS=$SPECIFIC_UPASSWORD
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user