osapi_volume snapshot-list doesn't work with cinder

Bug #1050190 reported by clayg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
James King

Bug Description

When running nova-api with osapi_volume enabled and volume_api_class set to nova.volume.cinder - nova volume-snapshot-list fails.

2012-09-13 04:28:53 INFO nova.api.openstack.wsgi [req-6056b2ad-cfdc-434f-a753-027657b89d02 demo demo] GET http://10.127.0.28:8776/v1/ac3a0f688ee94e829dede4b8056b8b85/snapshots/detail
GET http://10.127.0.28:8776/v1/ac3a0f688ee94e829dede4b8056b8b85/snapshots/detail
2012-09-13 04:28:53 DEBUG nova.api.openstack.wsgi [req-6056b2ad-cfdc-434f-a753-027657b89d02 demo demo] No Content-Type provided in request from (pid=16290) get_body /opt/stack/nova/nova/api/openstack/wsgi.py:775
No Content-Type provided in request
2012-09-13 04:28:53 ERROR nova.api.openstack.wsgi [req-6056b2ad-cfdc-434f-a753-027657b89d02 demo demo] Exception handling resource: get_all_snapshots() got an unexpected keyword argument 'search_opts'
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 925, in _process_stack
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1013, in dispatch
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/volume/snapshots.py", line 127, in detail
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi return self._items(req, entity_maker=_translate_snapshot_detail_view)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/volume/snapshots.py", line 137, in _items
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi search_opts=search_opts)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi TypeError: get_all_snapshots() got an unexpected keyword argument 'search_opts'
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi
Exception handling resource: get_all_snapshots() got an unexpected keyword argument 'search_opts'
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 925, in _process_stack
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1013, in dispatch
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/volume/snapshots.py", line 127, in detail
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi return self._items(req, entity_maker=_translate_snapshot_detail_view)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi File "/opt/stack/nova/nova/api/openstack/volume/snapshots.py", line 137, in _items
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi search_opts=search_opts)
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi TypeError: get_all_snapshots() got an unexpected keyword argument 'search_opts'
2012-09-13 04:28:53 TRACE nova.api.openstack.wsgi
2012-09-13 04:28:53 INFO nova.api.openstack.wsgi [req-6056b2ad-cfdc-434f-a753-027657b89d02 demo demo] http://10.127.0.28:8776/v1/ac3a0f688ee94e829dede4b8056b8b85/snapshots/detail returned with HTTP 400
http://10.127.0.28:8776/v1/ac3a0f688ee94e829dede4b8056b8b85/snapshots/detail returned with HTTP 400
2012-09-13 04:28:53 INFO nova.osapi_volume.wsgi.server [req-6056b2ad-cfdc-434f-a753-027657b89d02 demo demo] 10.127.0.28 - - [13/Sep/2012 04:28:53] "GET /v1/ac3a0f688ee94e829dede4b8056b8b85/snapshots/detail HTTP/1.1" 400 338 0.160828

There seems to have been a slight change in the signature between nova.volume.api.API.get_all_snapshots and nova.volume.cinder.API.get_all_snapshots.

https://review.openstack.org/#/c/12816/3/nova/volume/cinder.py,unified

Revision history for this message
Thierry Carrez (ttx) wrote :

Is that a Cinder-side fix or a Nova-side fix ?

Changed in nova:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
clayg (clay-gerrard) wrote :

Honestly I don't know if it's a critical fail, this configuration (running nova-volume-api talking to cinder) is a bit of hack, but may be important to some folks that are trying to migrate from nova-volume to cinder. Either way it's a trivial nova fix, I just happened to run into it when fixing lp bug #1042904.

James King (jking-6)
Changed in nova:
assignee: nobody → James King (jking-6)
Revision history for this message
Russell Bryant (russellb) wrote :

It looks like this is no longer a bug in master since nova-volume was removed completely. However, it's still an issue in stable/folsom.

Changed in nova:
status: Confirmed → Invalid
Revision history for this message
Vish Ishaya (vishvananda) wrote :

This actually still affects master since we still have the volume extensions in. They proxy over to cinder.

Changed in nova:
status: Invalid → Triaged
Revision history for this message
Vish Ishaya (vishvananda) wrote :

oops my bad, this isn't using the volume extension. Ignore my last comment

Changed in nova:
status: Triaged → Invalid
Sean Dague (sdague)
no longer affects: nova/folsom
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.