Reviewed: https://review.openstack.org/258962 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=abea8b15d78ffda4fd796b09bf650295832e32a6 Submitter: Jenkins Branch: master
commit abea8b15d78ffda4fd796b09bf650295832e32a6 Author: jichenjc <[email protected]> Date: Thu Dec 17 19:31:41 2015 +0800 Return empty object list instead [] When some error occurs, compute layer should return ObjectList instead of [] to the API layer. Change-Id: Ic33fb891e43c3348a79957169545dc509c56c341 Closes-Bug: 1527202 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1527202 Title: get_all function should return a empty object instead of list Status in OpenStack Compute (nova): Fix Released Bug description: jichen@devstack1:~$ curl -g -i -X GET http://192.168.122.239:8774/v2.1/d1c5aa58af6c426492c642eb649017be/servers/detail?metadata={'a':'b'} -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.6" -H "X-Auth-Token: 2fbccf9e89444b309bc2c0fb31afdbbd" HTTP/1.1 500 Internal Server Error X-Openstack-Nova-Api-Version: 2.6 Vary: X-OpenStack-Nova-API-Version Content-Length: 198 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-b14b6637-bb19-4a7c-b60a-92526d29f966 Date: Wed, 16 Dec 2015 16:42:35 GMT {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<type 'exceptions.AttributeError'>", "code": 500}}jichen@devstack1:~$ 2015-12-16 11:42:35.973 DEBUG nova.compute.api [req-b14b6637-bb19-4a7c-b60a-92526d29f966 admin demo] Searching by: {'deleted': False, 'project_id': u'd1c5aa58af6c426492c642eb649017be', u'metadata': u'{a:b}'} from (pid=5597) get_all /opt/stack/nova/nova/compute/api.py:2055 2015-12-16 11:42:35.973 ERROR nova.api.openstack.extensions [req-b14b6637-bb19-4a7c-b60a-92526d29f966 admin demo] Unexpected exception in API method 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions Traceback (most recent call last): 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions return f(*args, **kwargs) 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 280, in detail 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions servers = self._get_servers(req, is_detail=True) 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 412, in _get_servers 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions instance_list.fill_faults() 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions AttributeError: 'list' object has no attribute 'fill_faults' 2015-12-16 11:42:35.973 TRACE nova.api.openstack.extensions 2015-12-16 11:42:35.974 INFO nova.api.openstack.wsgi [req-b14b6637-bb19-4a7c-b60a-92526d29f966 admin demo] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <type 'exceptions.AttributeError'> To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1527202/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

