[Mitaka] 'AttributeError: name' when using multiple domain with LDAP driver

Bug #1593571 reported by Dongwon Cho
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Edmund Rhudy
openstack-dashboard (Ubuntu)
New
Undecided
Unassigned

Bug Description

I get 'AttributeError: name' when using multiple domain with LDAP driver.
Specifically, when I click 'Create Project', 'Manage Members', 'Modify Groups', 'Edit Project' and 'Modify Quotas' button on the 'Projects' page of 'Identify' menu, horizon makes those error messages below.

It doesn't seem to be related to keystone since there is no error message from keystone node and I can do those operations using CLI without any problem.

==> /var/log/apache2/error.log <== [97/7522]
[Fri Jun 17 14:44:57.440997 2016] [wsgi:error] [pid 93971:tid 140574614624000] Problem instantiating action class.
[Fri Jun 17 14:44:57.441049 2016] [wsgi:error] [pid 93971:tid 140574614624000] Traceback (most recent call last):
[Fri Jun 17 14:44:57.441060 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../horizon/workflows/base.py", line 370, in action
[Fri Jun 17 14:44:57.441083 2016] [wsgi:error] [pid 93971:tid 140574614624000] context)
[Fri Jun 17 14:44:57.441123 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/identity/projects/workflows.py", line 323, in __init__
[Fri Jun 17 14:44:57.441141 2016] [wsgi:error] [pid 93971:tid 140574614624000] groups_list = [(group.id, group.name) for group in all_groups]
[Fri Jun 17 14:44:57.441157 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 491, in __getattr__
[Fri Jun 17 14:44:57.441182 2016] [wsgi:error] [pid 93971:tid 140574614624000] raise AttributeError(k)
[Fri Jun 17 14:44:57.441199 2016] [wsgi:error] [pid 93971:tid 140574614624000] AttributeError: name
[Fri Jun 17 14:44:57.442367 2016] [wsgi:error] [pid 93971:tid 140574614624000] Internal Server Error: /horizon/identity/04e7fe0cfb19418a9ec2eacfe1d334d5/update/
[Fri Jun 17 14:44:57.442389 2016] [wsgi:error] [pid 93971:tid 140574614624000] Traceback (most recent call last):
[Fri Jun 17 14:44:57.442420 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 164, in get_response
[Fri Jun 17 14:44:57.442439 2016] [wsgi:error] [pid 93971:tid 140574614624000] response = response.render()
[Fri Jun 17 14:44:57.442455 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 158, in render
[Fri Jun 17 14:44:57.442480 2016] [wsgi:error] [pid 93971:tid 140574614624000] self.content = self.rendered_content
[Fri Jun 17 14:44:57.442497 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 135, in rendered_content
[Fri Jun 17 14:44:57.442514 2016] [wsgi:error] [pid 93971:tid 140574614624000] content = template.render(context, self._request)
[Fri Jun 17 14:44:57.442530 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py", line 74, in render
[Fri Jun 17 14:44:57.442555 2016] [wsgi:error] [pid 93971:tid 140574614624000] return self.template.render(context)
[Fri Jun 17 14:44:57.442579 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 210, in render
[Fri Jun 17 14:44:57.442596 2016] [wsgi:error] [pid 93971:tid 140574614624000] return self._render(context)
[Fri Jun 17 14:44:57.443601 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 202, in _render
[Fri Jun 17 14:44:57.443632 2016] [wsgi:error] [pid 93971:tid 140574614624000] return self.nodelist.render(context)
[Fri Jun 17 14:44:57.443649 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 905, in render
[Fri Jun 17 14:44:57.443666 2016] [wsgi:error] [pid 93971:tid 140574614624000] bit = self.render_node(node, context)
[Fri Jun 17 14:44:57.443696 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 919, in render_node
[Fri Jun 17 14:44:57.443714 2016] [wsgi:error] [pid 93971:tid 140574614624000] return node.render(context)
[Fri Jun 17 14:44:57.443730 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 576, in render
[Fri Jun 17 14:44:57.443747 2016] [wsgi:error] [pid 93971:tid 140574614624000] return self.nodelist.render(context)
[Fri Jun 17 14:44:57.443772 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 905, in render
[Fri Jun 17 14:44:57.443789 2016] [wsgi:error] [pid 93971:tid 140574614624000] bit = self.render_node(node, context)
[Fri Jun 17 14:44:57.443806 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 919, in render_node
[Fri Jun 17 14:44:57.443830 2016] [wsgi:error] [pid 93971:tid 140574614624000] return node.render(context)
[Fri Jun 17 14:44:57.443847 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 56, in render
[Fri Jun 17 14:44:57.443864 2016] [wsgi:error] [pid 93971:tid 140574614624000] result = self.nodelist.render(context)
[Fri Jun 17 14:44:57.443880 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 905, in render
[Fri Jun 17 14:44:57.443904 2016] [wsgi:error] [pid 93971:tid 140574614624000] bit = self.render_node(node, context)
[Fri Jun 17 14:44:57.443921 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 919, in render_node
[Fri Jun 17 14:44:57.443938 2016] [wsgi:error] [pid 93971:tid 140574614624000] return node.render(context)
[Fri Jun 17 14:44:57.443962 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 224, in render
[Fri Jun 17 14:44:57.443979 2016] [wsgi:error] [pid 93971:tid 140574614624000] nodelist.append(node.render(context))
[Fri Jun 17 14:44:57.443996 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 322, in render
[Fri Jun 17 14:44:57.444012 2016] [wsgi:error] [pid 93971:tid 140574614624000] match = condition.eval(context)
[Fri Jun 17 14:44:57.444036 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 937, in eval
[Fri Jun 17 14:44:57.444054 2016] [wsgi:error] [pid 93971:tid 140574614624000] return self.value.resolve(context, ignore_failures=True)
[Fri Jun 17 14:44:57.444071 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 648, in resolve
[Fri Jun 17 14:44:57.444096 2016] [wsgi:error] [pid 93971:tid 140574614624000] obj = self.var.resolve(context)
[Fri Jun 17 14:44:57.444113 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 789, in resolve
[Fri Jun 17 14:44:57.444129 2016] [wsgi:error] [pid 93971:tid 140574614624000] value = self._resolve_lookup(context)
[Fri Jun 17 14:44:57.444146 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 849, in _resolve_lookup
[Fri Jun 17 14:44:57.444170 2016] [wsgi:error] [pid 93971:tid 140574614624000] current = current()
[Fri Jun 17 14:44:57.444188 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../horizon/workflows/base.py", line 441, in has_required_fields
[Fri Jun 17 14:44:57.444205 2016] [wsgi:error] [pid 93971:tid 140574614624000] return any(field.required for field in self.action.fields.values())
[Fri Jun 17 14:44:57.444230 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../horizon/workflows/base.py", line 370, in action
[Fri Jun 17 14:44:57.444248 2016] [wsgi:error] [pid 93971:tid 140574614624000] context)
[Fri Jun 17 14:44:57.444264 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/identity/projects/workflows.py", line 323, in __init__
[Fri Jun 17 14:44:57.444289 2016] [wsgi:error] [pid 93971:tid 140574614624000] groups_list = [(group.id, group.name) for group in all_groups]
[Fri Jun 17 14:44:57.444307 2016] [wsgi:error] [pid 93971:tid 140574614624000] File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 491, in __getattr__
[Fri Jun 17 14:44:57.444323 2016] [wsgi:error] [pid 93971:tid 140574614624000] raise AttributeError(k)
[Fri Jun 17 14:44:57.444340 2016] [wsgi:error] [pid 93971:tid 140574614624000] AttributeError: name

dpkg -l | egrep 'horizon|dashboard'
ii openstack-dashboard 2:9.0.0-0ubuntu2.16.04.1 all Django web interface for OpenStack
ii openstack-dashboard-ubuntu-theme 2:9.0.0-0ubuntu2.16.04.1 all Ubuntu theme for the OpenStack dashboard
ii python-django-horizon 2:9.0.0-0ubuntu2.16.04.1 all Django module providing web based interaction with OpenStack

Dongwon Cho (dongwoncho)
summary: - 'AttributeError: name' when using multiple domain with LDAP driver
+ [Mitaka] 'AttributeError: name' when using multiple domain with LDAP
+ driver
Revision history for this message
Edmund Rhudy (erhudy) wrote :

I see this same error in Liberty Horizon (8.0.1) when using LDAP with Keystone v3, though only with the default domain.

Revision history for this message
Edmund Rhudy (erhudy) wrote :

To be clear, I mean I have one domain only configured. I would expect to see the error with multiple domains as well.

Edmund Rhudy (erhudy)
Changed in horizon:
assignee: nobody → Edmund Rhudy (erhudy)
status: New → In Progress
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/358048

Changed in horizon:
milestone: none → ocata-2
importance: Undecided → High
tags: added: keystone newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/358048
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=cb664ecf18bc68f03bc0a2ccff66d285872cde59
Submitter: Jenkins
Branch: master

commit cb664ecf18bc68f03bc0a2ccff66d285872cde59
Author: Edmund Rhudy <email address hidden>
Date: Fri Aug 19 14:50:12 2016 -0400

    Fixes traceback if group name attribute is missing

    This works around an issue where certain backends (e.g. LDAP)
    did not provide a group name, only ID, which would cause most
    identity management tasks in Horizon to fail. If no name is
    provided, the ID is duplicated as the group name.

    Change-Id: Iea87abf38d26cb2baff43521c7dd2ae0a00e9997
    Closes-Bug: #1593571

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/408827

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/newton)

Reviewed: https://review.openstack.org/408827
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=c7a40ac6fbb0a548818aa185a6ecb337e7bee138
Submitter: Jenkins
Branch: stable/newton

commit c7a40ac6fbb0a548818aa185a6ecb337e7bee138
Author: Edmund Rhudy <email address hidden>
Date: Fri Aug 19 14:50:12 2016 -0400

    Fixes traceback if group name attribute is missing

    This works around an issue where certain backends (e.g. LDAP)
    did not provide a group name, only ID, which would cause most
    identity management tasks in Horizon to fail. If no name is
    provided, the ID is duplicated as the group name.

    Change-Id: Iea87abf38d26cb2baff43521c7dd2ae0a00e9997
    Closes-Bug: #1593571
    (cherry picked from commit cb664ecf18bc68f03bc0a2ccff66d285872cde59)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b2

This issue was fixed in the openstack/horizon 11.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 10.0.2

This issue was fixed in the openstack/horizon 10.0.2 release.

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.