From 8eef7e103bf906d99c661b5dc5024b31b794d4fd Mon Sep 17 00:00:00 2001 From: Graham Hayes Date: Mon, 13 Feb 2017 13:19:42 +0000 Subject: [PATCH] Fix broken grenade gate in keystone v3, the openstack cli works completely differently when creating a user. The explictly adds the designate user to the designate project with the "Member" role. This was previously found in the main grenade project. Change-Id: I3addc95dce8f4f86c108ab18ace2b80003d22519 Related-Bug: #1662911 --- devstack/upgrade/resources.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index c02ac807d..109728612 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -34,10 +34,11 @@ function create { die $LINENO "Didn't create $DESIGNATE_PROJECT project" fi resource_save designate project_id $id + local project_id=$id # create the user, and set $id locally eval $(openstack user create $DESIGNATE_USER \ - --project $id \ + --project $project_id \ --password $DESIGNATE_PASS \ -f shell -c id) if [[ -z "$id" ]]; then @@ -45,6 +46,11 @@ function create { fi resource_save designate user_id $id + # BUG(sdague): this really shouldn't be required, in Keystone v2 a + # user created in a project was assigned to that project, in v3 it + # is not - https://bugs.launchpad.net/keystone/+bug/1662911 + openstack role add Member --user $id --project $project_id + _set_designate_user # Create a zone, and save the id