Skip to content

Commit 3154eab

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Cinder: add creator role when barbican is enabled"
2 parents 90e5479 + ccd116d commit 3154eab

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

lib/cinder

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,16 +388,24 @@ function configure_cinder {
388388

389389
# create_cinder_accounts() - Set up common required cinder accounts
390390

391-
# Tenant User Roles
391+
# Project User Roles
392392
# ------------------------------------------------------------------
393-
# service cinder admin # if enabled
393+
# SERVICE_PROJECT_NAME cinder service
394+
# SERVICE_PROJECT_NAME cinder creator (if Barbican is enabled)
394395

395396
# Migrated from keystone_data.sh
396397
function create_cinder_accounts {
397398
# Cinder
398399
if [[ "$ENABLED_SERVICES" =~ "c-api" ]]; then
399400

400-
create_service_user "cinder"
401+
local extra_role=""
402+
403+
# cinder needs the "creator" role in order to interact with barbican
404+
if is_service_enabled barbican; then
405+
extra_role=$(get_or_create_role "creator")
406+
fi
407+
408+
create_service_user "cinder" $extra_role
401409

402410
# block-storage is the official service type
403411
get_or_create_service "cinder" "block-storage" "Cinder Volume Service"

0 commit comments

Comments
 (0)