]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix setting of admin role in keystone service
authorZane Bitter <zbitter@redhat.com>
Wed, 11 Apr 2012 15:17:04 +0000 (17:17 +0200)
committerZane Bitter <zbitter@redhat.com>
Wed, 11 Apr 2012 15:17:04 +0000 (17:17 +0200)
The script was looking for the "admin" user instead of the "admin" *role*.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
tools/heat-keystone-service

index 5b869c9c29bb85882ec954a073f25da4415a92c4..3ddc629764003440c4c09b731ec07e8cb0dad0ca 100755 (executable)
@@ -22,7 +22,7 @@ if [[ -z "$SERVICE_TOKEN" ]]; then
     exit 1
 fi
 
-ADMIN_ROLE=$(keystone user-list | grep True | cut -d\| -f2,5 | grep admin | cut -d\| -f1)
+ADMIN_ROLE=$(keystone role-list | awk -F\| '($3 ~ "^ admin *$") { print $2 }')
 SERVICE_TENANT=$(keystone tenant-list | grep service | cut -d\| -f2)
 SERVICE_PASSWORD=${SERVICE_PASSWORD:-$OS_PASSWORD}
 if [[ "$SERVICE_PASSWORD" == "$OS_PASSWORD" ]]; then