RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1061343 - horizon errors out when adding myself to a group
Summary: horizon errors out when adding myself to a group
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: RDO
Classification: Community
Component: python-django-horizon
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: Icehouse
Assignee: Matthias Runge
QA Contact: Ami Jeain
URL:
Whiteboard:
: 1064819 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-04 16:12 UTC by Ami Jeain
Modified: 2014-05-26 14:01 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-26 14:01:23 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1276217 0 None None None Never

Description Ami Jeain 2014-02-04 16:12:28 UTC
Description of problem:

Horizon throws a "something went wrong" when adding myself to a group

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.login as admin
2.create a group
3.go to add users and add myself (admin) to this group

Actual results:


Expected results:


Additional info:

=> you will get a "something went wrong" message instead of giving a friendlier message

What I see, is that when doing this action, keystone invalidates the user, as if I 'back' to another page, I get "unauthorized" on every step I do.

from /var/log/horizon/horizon.log:

2014-02-04 17:40:13,673 4747 INFO horizon.tables.actions Added User: "admin"
2014-02-04 17:40:13,699 4747 DEBUG openstack_dashboard.api.keystone Creating a new keystoneclient connection to http://10.35.64.158:35357/v3.
2014-02-04 17:40:13,703 4747 DEBUG keystoneclient.httpclient Request returned failure status: 401
2014-02-04 17:40:13,704 4747 ERROR horizon.exceptions Unauthorized: The request you have made requires authentication. (HTTP 401)
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/groups/views.py", line 123, in get_data
    group_members = self._get_group_members()
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/groups/views.py", line 96, in _get_group_members
    group=group_id)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/keystone.py", line 293, in user_list
    users = keystoneclient(request, admin=True).users.list(**kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v3/users.py", line 102, in list
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 70, in func
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 340, in list
    self.collection_key)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 110, in _list
    resp, body = self.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 655, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 651, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 610, in request
    **request_kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 124, in request
    raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401)
2014-02-04 17:40:13,704 4747 DEBUG openstack_dashboard.api.keystone Using cached client for token: f332099fe46f81951d7b9bdf8f4eb5a3
2014-02-04 17:40:13,708 4747 DEBUG keystoneclient.httpclient Request returned failure status: 401
2014-02-04 17:40:13,708 4747 ERROR django.request Internal Server Error: /dashboard/admin/groups/cc0aafc591e54f25a501fae651ee5b61/manage_members/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 54, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 86, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 157, in get
    context = self.get_context_data(**kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/groups/views.py", line 117, in get_context_data
    context['group'] = self._get_group()
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/groups/views.py", line 89, in _get_group
    self._group = api.keystone.group_get(self.request, group_id)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/keystone.py", line 422, in group_get
    return manager.get(group_id)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v3/groups.py", line 78, in get
    group_id=base.getid(group))
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 70, in func
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 325, in get
    self.key)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 132, in _get
    resp, body = self.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 655, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 651, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 610, in request
    **request_kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 124, in request
    raise exceptions.from_response(resp, method, url)

Comment 1 Lars Kellogg-Stedman 2014-02-12 16:38:54 UTC
On CentOS 6.5, using:

python-keystone-2014.1-0.3.b2.el6.noarch
openstack-keystone-2014.1-0.3.b2.el6.noarch
python-django-horizon-2014.1-0.2b2.el6.noarch
openstack-dashboard-2014.1-0.2b2.el6.noarch

I can perform the following successfully:

- Log in to Horizon as "admin"
- Navigate to "/dashboard/admin/projects/"
- Select "Create Project"
- Create a new project named "testproject"
- Select "Modify Users" for that project
- Add "admin" to the project

This all seems to work without any errors.

If you're able to reproduce this with the current packages, can you update this bz with information about your distribution (RHEL/Fedora/CentOS) and the specific package versions involved?

Thanks!

Comment 2 Ami Jeain 2014-02-17 14:54:03 UTC
Hey Lars,
look also at https://bugs.launchpad.net/horizon/+bug/1276217.
It happened to me again on rhel 6.5. ping me and I might try to log you in into the system for you to debug.

Comment 3 Ami Jeain 2014-02-17 15:00:29 UTC
*** Bug 1064819 has been marked as a duplicate of this bug. ***

Comment 4 Lars Kellogg-Stedman 2014-02-17 15:55:11 UTC
Ami,

Can you confirm the n-v-r of the following packages on your system?

python-django-horizon
python-keystoneclient
openstack-dashboard
openstack-keystone
python-keystone

Does Keystone log anything interesting in /var/log/keystone/keystone.log?

Comment 5 Ami Jeain 2014-02-17 16:48:11 UTC
# rpm -qa |grep python-django-horizon
python-django-horizon-2013.2.1-1.el6ost.noarch

# rpm -qa |grep python-keystoneclient
python-keystoneclient-0.4.1-3.el6ost.noarch

# rpm -qa |grep openstack-dashboard
openstack-dashboard-2013.2.1-1.el6ost.noarch
openstack-dashboard-theme-2013.2.1-1.el6ost.noarch

# rpm -qa |grep keystone
python-keystone-2013.2.1-1.el6ost.noarch
python-keystoneclient-0.4.1-3.el6ost.noarch
openstack-keystone-2013.2.1-1.el6ost.noarch

Comment 6 Julie Pichon 2014-04-04 14:53:10 UTC
I don't think the status is correct, the fix hasn't merged upstream yet.

Comment 7 Matthias Runge 2014-04-07 06:31:21 UTC
(In reply to Julie Pichon from comment #6)
> I don't think the status is correct, the fix hasn't merged upstream yet.

My bad, you're right. It isn't merged yet upstream.

Comment 8 Matthias Runge 2014-05-26 14:01:23 UTC
closing this, as it's reported upstream and will be discussed upstream https://bugs.launchpad.net/horizon/+bug/1276217


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