nova-manage role add does not add the user to user_project_association

Bug #798384 reported by Kevin Bringard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
John Tran

Bug Description

When adding a user to OpenStack via nova-manage, the user_project_association table does not get updated:

nova-manage user create test1
export EC2_ACCESS_KEY=aad1165a-eecf-406d-b0ea-c01639ce7f28
export EC2_SECRET_KEY=<......>-e5b56dc25c5f
nova-manage role add test1 sysadmin
nova-manage role add test1 sysadmin test-project

mysql> select * from user_project_association where user_id = 'test1';
Empty set (0.00 sec)

This results in the user receiving a 403 forbidden when attempting to access the API. Adding the user manually resolves this problem, however the user is then unable to launch instances due to https://bugs.launchpad.net/nova/+bug/798370 (cannot launch instances unless they are an admin).

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → High
status: New → Confirmed
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
Revision history for this message
Kevin Bringard (kbringard) wrote :

It appears as though the user can be added to the project using the nova-manage project add <project> <user> command. Previously if the user did no belong to the project, the user was added to a project when adding their role to said project.

It's debatable if the user should be added to the user_project_association automatically or not, but at the very least the user running the nova-manage command should probably be told that the user's role was added to the project, but that the user is not globally associated with the project (or perhaps the role should not be added at all if they're not globally associated?).

Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → In Progress
Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.