Error when enabling keystone V3

Bug #1475861 reported by Ryu Ishimoto on 2015-07-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-midonet
Low
Antoni Segura Puimedon

Bug Description

Error seen in the Red Hat dashboard after enabling keystone v3 in horizon:
it appears that Horizon is making a call: get_version_from_service(service)
and it's trying to parse the endpoints of the service, and at least for the midonet service the array of endpoints is empty
and that throws an error: IndexError: list index out of range

Extract from the request:

```Environment:

Request Method: GET
Request URL: http://1.2.3.4/dashboard/admin/info/

Django Version: 1.6.5
Python Version: 2.7.5
Installed Applications:
['openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'openstack_dashboard.dashboards.redhat_access_plugin_openstack',
 'openstack_dashboard.dashboards.theme',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django_pyscss',
 'openstack_dashboard.django_pyscss_fix',
 'compressor',
 'horizon',
 'openstack_auth']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/site-packages/horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/horizon/decorators.py" in dec
  84. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/horizon/decorators.py" in dec
  52. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/views/generic/base.py" in view
  69. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  87. return handler(request, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py" in get
  146. context = self.get_context_data(**kwargs)
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/info/views.py" in get_context_data
  34. context = super(IndexView, self).get_context_data(**kwargs)
File "/usr/lib/python2.7/site-packages/horizon/tables/views.py" in get_context_data
  106. context = super(MultiTableMixin, self).get_context_data(**kwargs)
File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py" in get_context_data
  56. exceptions.handle(self.request)
File "/usr/lib/python2.7/site-packages/horizon/exceptions.py" in handle
  334. six.reraise(exc_type, exc_value, exc_traceback)
File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py" in get_context_data
  54. context["tab_group"].load_tab_data()
File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py" in load_tab_data
  122. exceptions.handle(self.request)
File "/usr/lib/python2.7/site-packages/horizon/exceptions.py" in handle
  334. six.reraise(exc_type, exc_value, exc_traceback)
File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py" in load_tab_data
  119. tab._data = tab.get_context_data(self.request)
File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py" in get_context_data
  459. self.load_table_data()
File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py" in load_table_data
  443. table.data = data_func()
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/info/tabs.py" in get_services_data
  40. keystone.Service(service, request.user.services_region))
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/keystone.py" in __init__
  85. 'publicURL')
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/base.py" in get_url_for_service
  237. identity_version = get_version_from_service(service)
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/base.py" in get_version_from_service
  220. endpoint = service['endpoints'][0]

Exception Type: IndexError at /admin/info/
Exception Value: list index out of range
```

Ryu Ishimoto (ryu-midokura) wrote :

Toni's comment:

We'd need the configuration of Keystone, Neutron, Midonet and how the midonet service should be registered with keystone in order to reproduce this bug.

YAMAMOTO Takashi (yamamoto) wrote :

as it seems ryu confirmed, let's reflect it to status.

Changed in networking-midonet:
status: New → Confirmed
Changed in networking-midonet:
importance: Undecided → Low
YAMAMOTO Takashi (yamamoto) wrote :

the information asked has never provided. i guess it was a deployment issue.
keystone v3 is working these days as far as i know.

Changed in networking-midonet:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers