Reviewed: https://review.openstack.org/127244 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=ad34b836fb6d8e2ba067e8c14512abc4ec0b4969 Submitter: Jenkins Branch: proposed/juno
commit ad34b836fb6d8e2ba067e8c14512abc4ec0b4969 Author: Rajesh Tailor <[email protected]> Date: Fri Sep 26 07:59:40 2014 -0700 Fix for Adopt glance.store library in Glance The store module is removed from glance project and new glance_store module is created, but the glance project code was not updated properly for the required changes. The exception (UnknownScheme) was moved to glance_store, but in glance image-create api (v1), it still refers to exception.UnknownScheme in get_store_or_400 method. Change-Id: I09e78b92d2d44a659412361b4f03b4a988714bf5 Closes-Bug: 1373454 ** Changed in: glance Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1373454 Title: glance-api raises 500 error for invalid scheme while creating image Status in OpenStack Image Registry and Delivery Service (Glance): Fix Released Bug description: glance-api raises 500 error for invalid scheme while creating image using v1 api in get_store_or_400() method. The reason, in this method exception.UnknownScheme() exception is caught and this UnknownScheme exception class is not present in glance/common/excepion.py module as it is moved under glance_store project. Ideally it should caught UnknownScheme exception from glance_store's exception module. Stacktrace on glance-api screen: 2014-09-24 07:06:38.868 31867 INFO glance.wsgi.server [e03c9dff-5213-4b05-9958-9b53d404c419 8264cb3f7ed04408ad6df9f6741f5be2 be4a5d48cbb748be923182b30ec ed78c - - -] Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 434, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/opt/stack/glance/glance/common/wsgi.py", line 394, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send application, catch_exc_info=False) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 106, in __call__ return request.get_response(self.application) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send application, catch_exc_info=False) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application app_iter = application(self.environ, start_response) File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 559, in __call__ return self._app(env, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/opt/stack/glance/glance/common/wsgi.py", line 394, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send application, catch_exc_info=False) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/opt/stack/glance/glance/common/wsgi.py", line 394, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send application, catch_exc_info=False) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/opt/stack/glance/glance/common/wsgi.py", line 394, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send application, catch_exc_info=False) File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__ return app(environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ return resp(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__ return resp(environ, start_response) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__ resp = self.call_func(req, *args, **self.kwargs) File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func return self.func(req, *args, **kwargs) File "/opt/stack/glance/glance/common/wsgi.py", line 683, in __call__ request, **action_args) File "/opt/stack/glance/glance/common/wsgi.py", line 707, in dispatch return method(*args, **kwargs) File "/opt/stack/glance/glance/common/utils.py", line 449, in wrapped return func(self, req, *args, **kwargs) File "/opt/stack/glance/glance/api/v1/images.py", line 824, in create image_meta = self._reserve(req, image_meta) File "/opt/stack/glance/glance/api/v1/images.py", line 538, in _reserve self.get_store_or_400(req, backend) File "/opt/stack/glance/glance/api/v1/images.py", line 1100, in get_store_or_400 except exception.UnknownScheme: AttributeError: 'module' object has no attribute 'UnknownScheme' Note: I have explicitly raised the store.UnknownScheme exception from the method get_store_or_400 to reproduce this error. To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1373454/+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

