Bug 1060450 - [Docs] [Keystone] Correct role is "_member_" and created automatically, section is unnecessary.
Summary: [Docs] [Keystone] Correct role is "_member_" and created automatically, secti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 6.0 (Juno)
Assignee: Radek Bíba
QA Contact: Andrew Dahms
URL:
Whiteboard:
Depends On:
Blocks: 1250289
TreeView+ depends on / blocked
 
Reported: 2014-02-01 20:18 UTC by Stephen Gordon
Modified: 2015-11-25 02:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 15807, Installation and Configuration Guide-4 Build Date: 23-01-2014 09:35:27 Topic ID: 15951-565017 [Latest]
Last Closed: 2015-11-25 02:16:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephen Gordon 2014-02-01 20:18:10 UTC
Title: Creating a Member Role

Describe the issue:

The member role is actually created in the keystone by default as "_member_", it does not need explicit creation. The correct action to take is to ensure that the users created in the Keystone chapter are added to the "_member_" role.

In Icehouse the dashboard will also correctly look for the "_member_" role instead of "Member".

Suggestions for improvement:

+Remove this section.
+Ensure keystone sections adds "_member_" role to users as they are created (admin and normal user account if one is created).

Comment 2 Martin Lopes 2014-02-04 01:50:06 UTC
This bug is being assigned to Bruce Reeler, who is now the designated docs specialist for keystone.

Comment 3 Stephen Gordon 2014-07-09 00:07:35 UTC
Bruce, any plans for this? The fact that we go out of our way to manually:

- Create a Member role
- Add it to every user
- Configure Horizon to use it

Is really confusing as none of this is required any more. The _member_ role is created automatically, assigned to every user, and is the default for Horizon.

Comment 4 Bruce Reeler 2014-07-10 02:00:06 UTC
A) Converted section 10.5.3  "Create a Member Role" (Topic ID 15951) into "Change Dashboard's default role" as follows:

A1) Mentioned that Dashboard uses default _member_ role, but left in steps to create a new role in case users wish to. 
A2) Formatted the original Note about changing Dashboard's default role into a final step in the procedure.


B) Edited "Procedure 3.10. Creating a regular user account" in section 
"⁠3.9. Create a Regular User Account" as follows:

B1) noted that Identity has a default role called _member_
B2) removed step 3 which was also, like section 10.5.3 in (A) above, creating a Member role.
B3) changed step 4 (using the command "keystone user-role-add") to associate the created user and tenant with _member_ role.

Comment 6 Stephen Gordon 2014-07-10 17:35:52 UTC
(In reply to Bruce Reeler from comment #4)

> B) Edited "Procedure 3.10. Creating a regular user account" in section 
> "⁠3.9. Create a Regular User Account" as follows:
> 
> B1) noted that Identity has a default role called _member_
> B2) removed step 3 which was also, like section 10.5.3 in (A) above,
> creating a Member role.
> B3) changed step 4 (using the command "keystone user-role-add") to associate
> the created user and tenant with _member_ role.

Did you actually test B3? As I understand it Keystone creates the role link automatically for the user/tenant combination and subsequent attempts to add it manually will fail.

Comment 8 Andrew Dahms 2015-04-23 23:39:12 UTC
Moving back to 'NEW' until reassignment.

Comment 9 Andrew Dahms 2015-05-05 11:56:13 UTC
Assigning to Radek for review.

Radek, most of the changes required for this bug have now been implemented, but we need to check if the command in B3 in comment #4 works. This will involve -

1. Checking that a default role '_member_' is created in Keystone.

2. Checking whether the command works, and removing it if it fails or is not required.

These changes need to be made in doc-Deploying_OpenStack_Learning_Environments_Manual_Setup in the RHEL-OSP documentation repository.

Kind regards,

Andrew

Comment 10 Radek Bíba 2015-05-13 07:52:39 UTC
I have users admin and test, and tenants admin and tenattest. These were all created by the commends used in the book. However, I don't seem to have the _member_ role, though:

[root@localhost ~(keystone_admin)]# keystone role-list
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| d1baee7c6a2e4ac888cf1680cadbe5ab | admin |
+----------------------------------+-------+

Consequently, I believe, I get the following error when I follow step 4 in procedure 3.11:

No role with a name or ID of '_member_' exists.

Stephen, could you please help me determine what's wrong here? If you want, I can give you the root password to my test box.

Comment 11 Radek Bíba 2015-05-20 09:42:19 UTC
I'd still welcome some information regarding the problem described in the previous comment. Still, if packstack --allinone is used to set up the OSP environment, the _member_ role does get created automatically, and when I follow "B3", no failure occurs.

Comment 12 Stephen Gordon 2015-06-01 01:41:11 UTC
(In reply to Radek Bíba from comment #11)
> I'd still welcome some information regarding the problem described in the
> previous comment. Still, if packstack --allinone is used to set up the OSP
> environment, the _member_ role does get created automatically, and when I
> follow "B3", no failure occurs.

I believe the default behaviour around this may have changed yet again. To ascertain exactly what happened in the manual case would need the output of:

1) keystone role-list

2) keystone user-role-list admin

3) grep member_role_ /etc/keystone/keystone.conf

Comment 13 Radek Bíba 2015-06-01 09:52:59 UTC
Note: Using a different machine but the same setup.

(In reply to Stephen Gordon from comment #12)
> 1) keystone role-list

+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| 411832b554c5409798a5640cf22b07a0 | admin |
+----------------------------------+-------+


> 2) keystone user-role-list admin

usage: keystone [--version] [--debug] [--os-username <auth-user-name>]
...
keystone: error: unrecognized arguments: admin

Perhaps you meant something like:
[root@sheep-3 ~]# keystone user-role-list --user admin --tenant admin
+----------------------------------+-------+----------------------------------+----------------------------------+
|                id                |  name |             user_id              |            tenant_id             |
+----------------------------------+-------+----------------------------------+----------------------------------+
| 411832b554c5409798a5640cf22b07a0 | admin | c3f2137da87947a6a3d0c38b3b4f85c8 | 714dc617f47549b8888c98f98c09caad |
+----------------------------------+-------+----------------------------------+----------------------------------+


 
> 3) grep member_role_ /etc/keystone/keystone.conf

# During a SQL upgrade member_role_id will be used to create a
# member_role_id will be used in the API add_user_to_project.
#member_role_id=9fe2ff9ee4384b1894a90878d3e92bab
# During a SQL upgrade member_role_name will be used to create
# with explicit role grants. After migration, member_role_name
#member_role_name=_member_

Comment 14 Stephen Gordon 2015-07-03 18:57:53 UTC
Hi Radek,

One more for the road - please provide the output of `keystone role-list`. What I am trying to confirm is the ID of the _member_ role in your system and that the admin user is actually in it.

Comment 15 Radek Bíba 2015-07-07 11:29:50 UTC
Hi Stephen,

The output of keystone role-list is already in comment 13:

+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| 411832b554c5409798a5640cf22b07a0 | admin |
+----------------------------------+-------+

This time, from yet another test box configured the same way, it's not much different:

# keystone role-list
+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| 3c7859248b054583925e1a5176447c61 | admin |
+----------------------------------+-------+

And again:

# keystone user-role-add --user USER --role _member_ --tenant TENANT
No role with a name or ID of '_member_' exists.

Comment 16 Radek Bíba 2015-07-15 08:49:00 UTC
Some more updates:

According to http://docs.openstack.org/juno/install-guide/install/yum/content/keystone-users.html, the _member_ role gets created automatically when the --tenant option is used while creating a user. And this is what I see when I remove USER (originally created by "keystone user-create --name USER --pass PASSWORD") and recreate it with --tenant:

# keystone role-list
+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| 3c7859248b054583925e1a5176447c61 | admin |
+----------------------------------+-------+
# keystone user-delete USER
# keystone user-create --name USER --tenant TENANT --pass PASSWORD
+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | 56910f2928024ede8d5484c3fffcc49a |
|   name   |               USER               |
| tenantId | 2587d813623a44ab9605bb09751a009a |
| username |               USER               |
+----------+----------------------------------+
# keystone role-list
+----------------------------------+----------+
|                id                |   name   |
+----------------------------------+----------+
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| 3c7859248b054583925e1a5176447c61 |  admin   |
+----------------------------------+----------+

So I think steps 2 and 3 in procedure 3.10 need these tweaks.

Comment 18 Stephen Gordon 2015-07-17 15:46:10 UTC
(In reply to Radek Bíba from comment #16)
> Some more updates:
> 
> According to
> http://docs.openstack.org/juno/install-guide/install/yum/content/keystone-
> users.html, the _member_ role gets created automatically when the --tenant
> option is used while creating a user. And this is what I see when I remove
> USER (originally created by "keystone user-create --name USER --pass
> PASSWORD") and recreate it with --tenant:
> 
> # keystone role-list
> +----------------------------------+-------+
> |                id                |  name |
> +----------------------------------+-------+
> | 3c7859248b054583925e1a5176447c61 | admin |
> +----------------------------------+-------+
> # keystone user-delete USER
> # keystone user-create --name USER --tenant TENANT --pass PASSWORD
> +----------+----------------------------------+
> | Property |              Value               |
> +----------+----------------------------------+
> |  email   |                                  |
> | enabled  |               True               |
> |    id    | 56910f2928024ede8d5484c3fffcc49a |
> |   name   |               USER               |
> | tenantId | 2587d813623a44ab9605bb09751a009a |
> | username |               USER               |
> +----------+----------------------------------+
> # keystone role-list
> +----------------------------------+----------+
> |                id                |   name   |
> +----------------------------------+----------+
> | 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
> | 3c7859248b054583925e1a5176447c61 |  admin   |
> +----------------------------------+----------+
> 
> So I think steps 2 and 3 in procedure 3.10 need these tweaks.

Right that makes sense, if you aren't associating them with a tenant then they aren't a member. Looks good.

Comment 20 Andrew Dahms 2015-08-05 03:02:07 UTC
Looks good to me; merging.

Comment 21 Andrew Dahms 2015-11-25 02:16:28 UTC
This content is now live on the Customer Portal.

Closing.


Note You need to log in before you can comment on or make changes to this bug.