Bug 1257645 - Horizon fails after login due to 'endpoint for volumev2 service named cinderv2 not found' error
Horizon fails after login due to 'endpoint for volumev2 service named cinderv...
Status: CLOSED NOTABUG
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
7.0 (Kilo)
All Linux
unspecified Severity medium
: ---
: 7.0 (Kilo)
Assigned To: Matthias Runge
Ido Ovadia
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-27 10:07 EDT by Jaison Raju
Modified: 2016-01-04 02:22 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-04 02:22:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
keystone catalog (6.85 KB, text/plain)
2015-08-27 10:07 EDT, Jaison Raju
no flags Details
horizon (144.62 KB, text/plain)
2015-08-27 10:07 EDT, Jaison Raju
no flags Details

  None (edit)
Description Jaison Raju 2015-08-27 10:07:21 EDT
Created attachment 1067760 [details]
keystone catalog

Description of problem:
Horizon fails with error :

AttributeError at /admin/

'NoneType' object has no attribute 'find'

Request Method: 	GET
Request URL: 	http://192.0.2.12/dashboard/admin/
Django Version: 	1.8.3
Exception Type: 	AttributeError
Exception Value: 	

'NoneType' object has no attribute 'find'

Exception Location: 	/usr/lib64/python2.7/urlparse.py in urlsplit, line 181
Python Executable: 	/usr/bin/python
Python Version: 	2.7.5
Python Path: 	

['/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../..',
 '/usr/lib64/python27.zip',
 '/usr/lib64/python2.7',
 '/usr/lib64/python2.7/plat-linux2',
 '/usr/lib64/python2.7/lib-tk',
 '/usr/lib64/python2.7/lib-old',
 '/usr/lib64/python2.7/lib-dynload',
 '/usr/lib64/python2.7/site-packages',
 '/usr/lib64/python2.7/site-packages/gtk-2.0',
 '/usr/lib/python2.7/site-packages',
 '/usr/share/openstack-dashboard/openstack_dashboard']

Server time: 	Tue, 25 Aug 2015 08:11:13 +0000


This looks similar to the volumev2 missing bug , but we had created the volumev2
endpoint manually :
2015-08-26 06:34:43,938 17638 DEBUG openstack_auth.backend Beginning user authentication
2015-08-26 06:34:43,939 17638 DEBUG openstack_auth.plugin.password Attempting to authenticate for admin
2015-08-26 06:34:43,940 17638 DEBUG keystoneclient.auth.identity.v2 Making authentication request to http://192.0.2.11:5000/v2.0/tokens
2015-08-26 06:34:44,011 17638 DEBUG keystoneclient.session REQ: curl -g -i -X GET http://192.0.2.11:5000/v2.0/tenants -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}1e71ddb58f0b8a4664856c46ccd07b0d03281151"
2015-08-26 06:34:44,037 17638 DEBUG keystoneclient.session RESP: [200] content-length: 143 vary: X-Auth-Token connection: keep-alive date: Wed, 26 Aug 2015 06:34:44 GMT content-type: application/json x-openstack-request-id: req-12fca329-4501-41ac-9341-6586454d6c2e 
RESP BODY: {"tenants_links": [], "tenants": [{"description": "admin tenant", "enabled": true, "id": "9071a9aa0ed24eb3822acca4d483ecf3", "name": "admin"}]}

2015-08-26 06:34:44,037 17638 DEBUG keystoneclient.auth.identity.v2 Making authentication request to http://192.0.2.11:5000/v2.0/tokens
2015-08-26 06:34:44,077 17638 DEBUG openstack_auth.backend Authentication completed.
2015-08-26 06:34:44,078 17638 INFO openstack_auth.forms Login successful for user "admin".
2015-08-26 06:34:44,096 17638 WARNING openstack_dashboard.api.cinder Cinder v2 requested but no 'volumev2' service type available in Keystone catalog.
2015-08-26 06:34:44,096 17638 ERROR django.request Internal Server Error: /dashboard/admin/volumes/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py", line 146, in get
    context = self.get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 107, in get_context_data
    context = super(MultiTableMixin, self).get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py", line 56, in get_context_data
    exceptions.handle(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py", line 54, in get_context_data
    context["tab_group"].load_tab_data()
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 128, in load_tab_data
    exceptions.handle(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 125, in load_tab_data
    tab._data = tab.get_context_data(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 465, in get_context_data
    self.load_table_data()
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 449, in load_table_data
    table.data = data_func()
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/volumes/tabs.py", line 41, in get_volumes_data
    volumes = self._get_volumes(search_opts={'all_tenants': True})
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/volumes/tabs.py", line 38, in _get_volumes
    _('Unable to retrieve volume list.'))
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/volumes/tabs.py", line 35, in _get_volumes
    search_opts=search_opts)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/cinder.py", line 198, in volume_list
    for t in transfer_list(request, search_opts=search_opts)}
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/cinder.py", line 596, in transfer_list
    detailed=detailed, search_opts=search_opts)]
  File "/usr/lib/python2.7/site-packages/cinderclient/v2/volume_transfers.py", line 93, in list
    "transfers")
  File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 65, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 326, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 283, in _cs_request
    self.authenticate()
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 398, in authenticate
    magic_tuple = urlparse.urlsplit(self.auth_url)
  File "/usr/lib64/python2.7/urlparse.py", line 181, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 3 Jaison Raju 2015-08-27 10:07:48 EDT
Created attachment 1067761 [details]
horizon
Comment 5 Matthias Runge 2015-08-27 14:19:58 EDT
could you please append the output of 
keystone service-list

the name of the endpoint doesn't really matter, it's the type of the service, it needs to be volumev2
Comment 6 Jaison Raju 2015-08-31 04:35:21 EDT
Looks like it does have volumev2 type . 

[heat-admin@overcloud-controller-0 ~]$ keystone service-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
+----------------------------------+------------+---------------+------------------------------+
|                id                |    name    |      type     |         description          |
+----------------------------------+------------+---------------+------------------------------+
| 9c18ca9a0c7e4496a23a66ffee34d0bc | ceilometer |    metering   |      Ceilometer Service      |
| bf22d07dc87a47e283881c1a48581329 |   cinder   |     volume    |    Cinder Volume Service     |
| 778e562a4ba04a37836b78e5ad1be94a |  cinderv2  |    volumev2   |   OpenStack Block Storage    |
| f0ab95238d3e4753abc30f5f8c316dcc |    ec2     |      ec2      |   EC2 Compatibility Layer    |
| 30ab4882f3bd484494b604331fa11ac3 |   glance   |     image     |     Glance Image Service     |
| 004c285820f54232a184758167ab2a79 |    heat    | orchestration |         Heat Service         |
| a0aaf989c5c54fa2aab3fe7de8b6de59 |  horizon   |   dashboard   |     OpenStack Dashboard      |
| 69e12f8c47cd4268b1f1c1193fdcff29 |  keystone  |    identity   |  Keystone Identity Service   |
| ed37ccb31e624926afc9d1df86e41b65 |  neutron   |    network    |       Neutron Service        |
| 2380b07bccb2440bb46a4de87ab44176 |    nova    |    compute    |     Nova Compute Service     |
| 74cee92821454588bd8b81965ac7926d |    nova    |   computev3   |   Nova Compute Service v3    |
| a6c5bab14fac477db8aa418f15a09d4d |   swift    |  object-store | Swift Object Storage Service |
+----------------------------------+------------+---------------+------------------------------+

Do we need any further data to investigate this ?

Thanks,

Regards,
Jaison R

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