[Yahoo-eng-team] [Bug 1579706] Re: listing nova instances with invalid status raises 500 InternalServerError for admin user
** Changed in: nova/mitaka Status: Fix Committed => 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/1579706 Title: listing nova instances with invalid status raises 500 InternalServerError for admin user Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) mitaka series: Fix Released Bug description: Listing nova instances with invalid status raises 500 InternalServerError for admin user. Steps to reproduce == Command: nova list --status invalid-status Actual result = ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-07567061-bd94-4c83-ba8e-510cad9f388b) Expected result === It should return empty instance list. n-API LOG: 2016-05-09 10:42:28.653 ERROR nova.api.openstack [req-07567061-bd94-4c83-ba8e-510cad9f388b admin admin] Caught error: 'instances' 2016-05-09 10:42:28.653 TRACE nova.api.openstack Traceback (most recent call last): 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/__init__.py", line 134, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return req.get_response(self.application) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in s end 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in c all_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_f unc 2016-05-09 10:42:28.653 TRACE nova.api.openstack return self.func(req, *args, **kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__in it__.py", line 467, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack response = req.get_response(self._app) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in send 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in call_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 141, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack response = self.app(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func 2016-05-09 10:42:28.653 TRACE nova.api.openstack return self.func(req, *args, **kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 674, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack content_type, body, accept)
[Yahoo-eng-team] [Bug 1579706] Re: listing nova instances with invalid status raises 500 InternalServerError for admin user
** Also affects: nova/mitaka Importance: Undecided Status: New ** Changed in: nova Importance: Low => Medium ** Changed in: nova/mitaka Status: New => In Progress ** Changed in: nova/mitaka Importance: Undecided => Medium ** Changed in: nova/mitaka Assignee: (unassigned) => Matt Riedemann (mriedem) -- 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/1579706 Title: listing nova instances with invalid status raises 500 InternalServerError for admin user Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) mitaka series: In Progress Bug description: Listing nova instances with invalid status raises 500 InternalServerError for admin user. Steps to reproduce == Command: nova list --status invalid-status Actual result = ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-07567061-bd94-4c83-ba8e-510cad9f388b) Expected result === It should return empty instance list. n-API LOG: 2016-05-09 10:42:28.653 ERROR nova.api.openstack [req-07567061-bd94-4c83-ba8e-510cad9f388b admin admin] Caught error: 'instances' 2016-05-09 10:42:28.653 TRACE nova.api.openstack Traceback (most recent call last): 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/__init__.py", line 134, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return req.get_response(self.application) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in s end 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in c all_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_f unc 2016-05-09 10:42:28.653 TRACE nova.api.openstack return self.func(req, *args, **kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__in it__.py", line 467, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack response = req.get_response(self._app) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in send 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in call_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 141, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack response = self.app(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func 2016-05-09 10:42:28.653 TRACE
[Yahoo-eng-team] [Bug 1579706] Re: listing nova instances with invalid status raises 500 InternalServerError for admin user
Reviewed: https://review.openstack.org/335648 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ee4d69e28dfb3d4764186d0c0212d53c99bda3ca Submitter: Jenkins Branch:master commit ee4d69e28dfb3d4764186d0c0212d53c99bda3ca Author: EdLeafeDate: Wed Jun 29 18:51:34 2016 + Return HTTP 200 on list for invalid status The server listing API raises a 500 error if you pass an invalid status filter for admin user. In the case of a non-admin user, it simply returns an empty list. In the case of an admin user, it fetches extended server attributes, so a condition was added to get extended server attributes only when servers list is not empty. This change simply removes the cause of the 500 exception. A subsequent patch with a microversion bump will modify the behavior so that a 400 Bad Request will be raised for an invalid status, for both admin and non-admin alike. Co-Authored-By: Dinesh Bhor Closes-Bug: #1579706 Change-Id: I10bde78f0a9ac59b8646d58f62fa5056f989f54f ** 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/1579706 Title: listing nova instances with invalid status raises 500 InternalServerError for admin user Status in OpenStack Compute (nova): Fix Released Bug description: Listing nova instances with invalid status raises 500 InternalServerError for admin user. Steps to reproduce == Command: nova list --status invalid-status Actual result = ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-07567061-bd94-4c83-ba8e-510cad9f388b) Expected result === It should return empty instance list. n-API LOG: 2016-05-09 10:42:28.653 ERROR nova.api.openstack [req-07567061-bd94-4c83-ba8e-510cad9f388b admin admin] Caught error: 'instances' 2016-05-09 10:42:28.653 TRACE nova.api.openstack Traceback (most recent call last): 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/__init__.py", line 134, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return req.get_response(self.application) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in s end 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in c all_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call __ 2016-05-09 10:42:28.653 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_f unc 2016-05-09 10:42:28.653 TRACE nova.api.openstack return self.func(req, *args, **kwargs) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__in it__.py", line 467, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack response = req.get_response(self._app) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1299, in send 2016-05-09 10:42:28.653 TRACE nova.api.openstack application, catch_exc_info=False) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1263, in call_application 2016-05-09 10:42:28.653 TRACE nova.api.openstack app_iter = application(self.environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ 2016-05-09 10:42:28.653 TRACE nova.api.openstack return resp(environ, start_response) 2016-05-09 10:42:28.653 TRACE nova.api.openstack File