Browse Source

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
tags/5.0.0.0b1
Graham Hayes 2 years ago
parent
commit
8eef7e103b
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      devstack/upgrade/resources.sh

+ 7
- 1
devstack/upgrade/resources.sh View File

@@ -34,10 +34,11 @@ function create {
34 34
         die $LINENO "Didn't create $DESIGNATE_PROJECT project"
35 35
     fi
36 36
     resource_save designate project_id $id
37
+    local project_id=$id
37 38
 
38 39
     # create the user, and set $id locally
39 40
     eval $(openstack user create $DESIGNATE_USER \
40
-        --project $id \
41
+        --project $project_id \
41 42
         --password $DESIGNATE_PASS \
42 43
         -f shell -c id)
43 44
     if [[ -z "$id" ]]; then
@@ -45,6 +46,11 @@ function create {
45 46
     fi
46 47
     resource_save designate user_id $id
47 48
 
49
+    # BUG(sdague): this really shouldn't be required, in Keystone v2 a
50
+    # user created in a project was assigned to that project, in v3 it
51
+    # is not - https://bugs.launchpad.net/keystone/+bug/1662911
52
+    openstack role add Member --user $id --project $project_id
53
+
48 54
     _set_designate_user
49 55
 
50 56
     # Create a zone, and save the id

Loading…
Cancel
Save