AttributeError: display_name when changing cinder endpoint to v2

Bug #1255977 reported by Dafna Ron on 2013-11-28
This bug report is a duplicate of:  Bug #1226944: Cinder API v2 support. Edit Remove
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Undecided
Unassigned

Bug Description

cinder endpoint v2 changed the volume names attr to --name instead of --display-name.

when I change the cinder endpoint to v2 and create volumes, horizon crashes when we try to query the volumes:

2013-11-28 13:26:10,862 24349 ERROR django.request Internal Server Error: /dashboard/project/volumes/
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 54, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/django/views/generic/base.py", line 48, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/django/views/generic/base.py", line 69, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/horizon/tables/views.py", line 155, in get
    handled = self.construct_tables()
  File "/usr/lib/python2.6/site-packages/horizon/tables/views.py", line 146, in construct_tables
    handled = self.handle_table(table)
  File "/usr/lib/python2.6/site-packages/horizon/tables/views.py", line 118, in handle_table
    data = self._get_data_dict()
  File "/usr/lib/python2.6/site-packages/horizon/tables/views.py", line 182, in _get_data_dict
    self._data = {self.table_class._meta.name: self.get_data()}
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/volumes/views.py", line 85, in get_data
    self._set_id_if_nameless(volumes, instances)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/volumes/views.py", line 67, in _set_id_if_nameless
    if not volume.display_name:
  File "/usr/lib/python2.6/site-packages/cinderclient/base.py", line 268, in __getattr__
    raise AttributeError(k)
AttributeError: display_name

to reproduce:
Run the following in cli:

1. install openstack with packstack
2. change cinder's endpoint in keystone to v2:

keystone endpoint-create --region RegionOne --service-id 10fd33fdca4f4ca4a2e21c2c786a3495 --publicurl 'http://<ip>:8776/v2/%(tenant_id)s' --adminurl 'http://<ip>:8776/v2/%(tenant_id)s' --internalurl 'http://<ip>:8776/v2/%(tenant_id)s'

delete the old v1 endpoint:

keystone endpoint-delete <endpoint that uses v1>

3. create a volume using v2 API:

OS_VOLUME_API_VERSION=2 cinder create 10 --name <name>

4. log in to horizon -> project -> volumes

result:
Horizon gives an attr error on name

David Taylor (dtaylor-z) wrote :

I am experiencing this same issue. Whenever I try to access the Volumes tab in Horizon I get the same error message as above.

Cinder Version: 1.0.7

Napo Mokoetle (azanians) wrote :

I've also been experiencing this exact same problem with attaching volumes to virtual instances. When I try to attach a volume with the following command:
=============+
root@ts036953:/home/pssuser# nova volume-attach fedora1 08d565c2-e5ee-4ca1-8deb-27235396751f /dev/vdb
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-008288f6-039c-4052-960f-521838515ac0)
=============+

And then when I try to attach to device that the instance already has I get the following message. Which kind of indicates that the instance is a least getting touched by the "nova volume-attach" command. What logs can I look into to see more detailed messages on what could be going wrong during this volume-attach attempt?

=============+
root@ts036953:/home/pssuser# nova volume-attach fedora1 08d565c2-e5ee-4ca1-8deb-27235396751f /dev/vda
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 409) (Request-ID: req-83c8afe9-d515-4f7c-9ccd-8d9e37a0f2e5)
=============+

Julie Pichon (jpichon) wrote :

You might be interested in bug 1215772, Nova doesn't support Cinder v2 yet.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions