Comment 7 for bug 962615

Revision history for this message
Chuck Thier (cthier) wrote : Re: Unable to list volumes after building from snapshot

We also have the same issue in our environment.

I get a 500 return code with the following Traceback:

2012-04-18 17:50:10 ERROR nova.api.openstack [req-fb168c27-222a-4598-8dc7-2cc0e2c03648 162472 4801] Caught error: expected string or Unicode object, long found
2012-04-18 17:50:10 TRACE nova.api.openstack Traceback (most recent call last):
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/__init__.py", line 41, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack return req.get_response(self.application)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
2012-04-18 17:50:10 TRACE nova.api.openstack application, catch_exc_info=False)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
2012-04-18 17:50:10 TRACE nova.api.openstack app_iter = application(self.environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack return resp(environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack return resp(environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack return resp(environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack response = self.app(environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack return resp(environ, start_response)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
2012-04-18 17:50:10 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/wsgi.py", line 803, in __call__
2012-04-18 17:50:10 TRACE nova.api.openstack content_type, body, accept)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/wsgi.py", line 851, in _process_stack
2012-04-18 17:50:10 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/wsgi.py", line 926, in dispatch
2012-04-18 17:50:10 TRACE nova.api.openstack return method(req=request, **action_args)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/volume/volumes.py", line 201, in detail
2012-04-18 17:50:10 TRACE nova.api.openstack return self._items(req, entity_maker=_translate_volume_detail_view)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/api/openstack/volume/volumes.py", line 207, in _items
2012-04-18 17:50:10 TRACE nova.api.openstack volumes = self.volume_api.get_all(context)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/volume/api.py", line 171, in get_all
2012-04-18 17:50:10 TRACE nova.api.openstack context.project_id)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/db/api.py", line 1016, in volume_get_all_by_project
2012-04-18 17:50:10 TRACE nova.api.openstack return IMPL.volume_get_all_by_project(context, project_id)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 129, in wrapper
2012-04-18 17:50:10 TRACE nova.api.openstack return f(*args, **kwargs)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/api.py", line 2512, in volume_get_all_by_project
2012-04-18 17:50:10 TRACE nova.api.openstack return _volume_get_query(context).filter_by(project_id=project_id).all()
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1453, in all
2012-04-18 17:50:10 TRACE nova.api.openstack return list(self)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1676, in instances
2012-04-18 17:50:10 TRACE nova.api.openstack rows = [process[0](row, None) for row in fetch]
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py", line 2234, in _instance
2012-04-18 17:50:10 TRACE nova.api.openstack populate_state(state, dict_, row, isnew, only_load_props)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py", line 2113, in populate_state
2012-04-18 17:50:10 TRACE nova.api.openstack populator(state, dict_, row)
2012-04-18 17:50:10 TRACE nova.api.openstack File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/strategies.py", line 127, in new_execute
2012-04-18 17:50:10 TRACE nova.api.openstack dict_[key] = row[col]
2012-04-18 17:50:10 TRACE nova.api.openstack TypeError: expected string or Unicode object, long found

manually setting the snapshot_id to NULL will allow you to list again.

Brian Waldon: For context this is currently happening in our Dev environment (see me on IRC if you need more details)