Hide Forgot
Created attachment 830242 [details] log Description of problem: 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 Version-Release number of selected component (if applicable): python-django-horizon-2013.2-5.el6ost.noarch How reproducible: 100% Steps 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 Actual results: Horizon gives an attr error on name Expected results: we should be able to query both v1 and v2 attr. but if not we need a clear error and not an attr error. Additional info: 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
Horizon does not support the Cinder v2 API in Havana, cf. upstream bug.
How to test (copied from blueprint's whiteboard in case it gets lost): In the local settings, set 'volume' in OPENSTACK_API_VERSIONS to 1 or 2 depending on the version you want to test. OPENSTACK_API_VERSIONS = { "volume": 2 } If your debug levels are set, you should be able to verify that the cinderclient calls are using the appropriate v1 or v2 URL. Panels of interests: * Volumes: All the volume actions should still work using either v1 or v2 * Images & Snapshots: Volume snapshots actions should work using v1 and v2 * Instances: Create instance has several options related to volumes and booting from volumes, these should still work and the volumes or volume snapshots displayed correct * Admin - Volumes: Should display correctly, no changes for volume types which are still expected to work with both versions. The name display was also generally improved so that the volume id is always shown if the volume doesn't have a name.
*** Bug 1059471 has been marked as a duplicate of this bug. ***
Fixing up the blueprint URL (oops)
This was merged during upstream Icehouse and should already be available in our packages.
Note that this bug is marked for RHEL 7.0 which uses a different python altogether. I have have changed the settings: OPENSTACK_API_VERSIONS = { "volume": 2 } restarted the services, and created a new volume. See attached cinder logs, it seems fine to me. Horizon is working properly, nothing unusual in the horizon.log tested on python-django-horizon-2014.1-7.el7ost.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0855.html