From f56f7a557ac4941b5204852f4173db9cf82b4dae Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Tue, 9 Nov 2021 10:57:25 +0100 Subject: [PATCH] Stop creating userrc_early We can use the devstack-admin cloud configuration everywhere now and don't need to set environment variables with cloud credentials any longer. Fix the swift setup, where some more options need to be explicitly specified now and the default OS_CLOUD setting overridden. Signed-off-by: Dr. Jens Harbott Change-Id: I86ffa9cd52454f1c1c72d29b3a0e0caa3e44b829 --- lib/swift | 15 +++++++++------ stack.sh | 28 +++------------------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/lib/swift b/lib/swift index b376993150..9c13701c6e 100644 --- a/lib/swift +++ b/lib/swift @@ -866,12 +866,15 @@ function stop_swift { function swift_configure_tempurls { # note we are using swift credentials! - OS_USERNAME=swift \ - OS_PASSWORD=$SERVICE_PASSWORD \ - OS_USER_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \ - OS_PROJECT_NAME=$SERVICE_PROJECT_NAME \ - OS_PROJECT_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \ - openstack object store account \ + openstack --os-cloud "" \ + --os-region-name $REGION_NAME \ + --os-auth-url $KEYSTONE_SERVICE_URI \ + --os-username=swift \ + --os-password=$SERVICE_PASSWORD \ + --os-user-domain-name=$SERVICE_DOMAIN_NAME \ + --os-project-name=$SERVICE_PROJECT_NAME \ + --os-project-domain-name=$SERVICE_DOMAIN_NAME \ + object store account \ set --property "Temp-URL-Key=$SWIFT_TEMPURL_KEY" } diff --git a/stack.sh b/stack.sh index b5ad81b081..ead56e68c0 100755 --- a/stack.sh +++ b/stack.sh @@ -1063,35 +1063,13 @@ fi # Keystone # -------- -# Rather than just export these, we write them out to a -# intermediate userrc file that can also be used to debug if -# something goes wrong between here and running -# tools/create_userrc.sh (this script relies on services other -# than keystone being available, so we can't call it right now) -cat > $TOP_DIR/userrc_early <> $TOP_DIR/userrc_early start_tls_proxy http-services '*' 443 $SERVICE_HOST 80 fi -source $TOP_DIR/userrc_early - -# Write a clouds.yaml file +# Write a clouds.yaml file and use the devstack-admin cloud write_clouds_yaml +export OS_CLOUD=devstack-admin if is_service_enabled keystone; then echo_summary "Starting Keystone" @@ -1380,7 +1358,7 @@ fi # which is helpful in image bundle steps. if is_service_enabled nova && is_service_enabled keystone; then - USERRC_PARAMS="-PA --target-dir $TOP_DIR/accrc" + USERRC_PARAMS="-PA --target-dir $TOP_DIR/accrc --os-password $ADMIN_PASSWORD" if [ -f $SSL_BUNDLE_FILE ]; then USERRC_PARAMS="$USERRC_PARAMS --os-cacert $SSL_BUNDLE_FILE"