Horizon, python-keystoneclient treat "primary project" / tenantId differently

Bug #1285138 reported by Roman Neuhauser
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Kanchan Gupta

Bug Description

Horizon makes the "primary project" field mandatory while it's optional in python-keystoneclient. we discussed this in SUSE:

> > if a "primary project" is mandatory in the web interface, it should be in the
> > command line as well. or vice versa.

> Actually... why?

because consistency. because with the current state of things you are heading
for a steady stream (ok, just a trickle but steady anyway) of users asking this
question. the web ui makes it seem like the "primary project" is something
crucial, and then the command line makes clear that it's actually superfluous,
and since the user does not know (at the beginning) which it is, s/he'll be
wondering: is it a bug in keystone(1)? am i going to screw something up
horribly if i create a user with no tenantId? you'll have to document it,
people will miss the documentation and ask support anyway...

> Looking at the keystone and keystoneclient code, it's indeed
> not mandatory to provide a primary project when creating a user. But that
> doesn't mean that the webui should follow this: the webui is a simplified view
> of OpenStack and doesn't allow everything OpenStack allows.

we have one product with different interfaces. (perceived) complexity of the
overall system goes *up* as the interfaces diverge. asymmetry increases
cognitive load. also, simplified means "a subset of" to me, and you can't
change the "primary project" using keystone(1), Horizon is disjoint, maybe
complementary, but not simplified.

Changed in horizon:
assignee: nobody → Santiago Baldassin (santiago-b-baldassin)
Changed in horizon:
assignee: Santiago Baldassin (santiago-b-baldassin) → nobody
Revision history for this message
Julie Pichon (jpichon) wrote :

Consistency sounds good to me.

From the pure UI side, it looks like this could simply be a matter of calling the default option "No default project", give it a specific fake id and check for that before attempting to update the default project.

https://github.com/openstack/horizon/blob/ac0ccc8e06/openstack_dashboard/dashboards/admin/users/forms.py#L53

We'll also need to update the user_update() API call to avoid always trying to update the default tenant no matter what:

https://github.com/openstack/horizon/blob/ac0ccc8e06/openstack_dashboard/api/keystone.py#L337

Changed in horizon:
status: New → Triaged
importance: Undecided → Medium
Changed in horizon:
assignee: nobody → tcs_openstack_group (tcs-openstack-group)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/106024

Changed in horizon:
assignee: tcs_openstack_group (tcs-openstack-group) → Kanchan Gupta (kanchan-gupta1)
status: Triaged → In Progress
Revision history for this message
Yash Bathia (ybathia) wrote :

If we are making Primary project optional while creating a new user, why should we force the user to select a value for the optional "Role" field?. Shouldn't Role field also have an option "None" or "Select a role" which can be left as it is when no Primary project is selected?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/106024
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Kent Wang (k.wang) wrote :

It looks like this is fixed in latest release

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Closing this bug according to the previous comment

Changed in horizon:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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