← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1487975] Re: Capture operation fails with error 500 "The server has either erred or is incapable of performing the requested operation." when inputted in 4 byte unicode characters

 

** Changed in: glance
       Status: New => 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/1487975

Title:
  Capture operation fails with error 500 "The server has either erred or
  is incapable of performing the requested operation." when inputted in
  4 byte unicode characters

Status in Glance:
  Fix Released

Bug description:
  Glance currently 500's when captured a vm with image name with a
  4-byte utf-8 character in it.

  glance api log:

  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client [req-73bb1b4a-0f6c-49ee-93e4-60bbccfda528 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 20a07ca65fc44285bd68287a605c8a53 - - -] Registry client request POST /images raised ServerError
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client Traceback (most recent call last):
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 121, in do_request
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client     **kwargs)
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 71, in wrapped
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client     return func(self, *args, **kwargs)
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 377, in do_request
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client     headers=copy.deepcopy(headers))
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 88, in wrapped
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client     return func(self, method, url, body, headers)
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 534, in _do_request
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client     raise exception.ServerError()
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client ServerError: [G'\uff34\uff48\uff45 \uff52\uff45\uff51\uff55\uff45\uff53\uff54 \uff52eturned 500 Internal Server Error.\u0e0f\u0e39\u0130\u0131\uff5c]
  2015-08-18 04:19:22.315 15879 ERROR glance.registry.client.v1.client
  2015-08-18 04:19:22.393 15879 INFO eventlet.wsgi.server [req-73bb1b4a-0f6c-49ee-93e4-60bbccfda528 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 20a07ca65fc44285bd68287a605c8a53 - - -] Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 454, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 56, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 590, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 99, in __call__
      return request.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 434, in __call__
      response = req.get_response(self._app)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 590, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 203, in __call__
      return app(environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 881, in __call__
      request, **action_args)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 905, in dispatch
      return method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 508, in wrapped
      return func(self, req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 884, in create
      image_meta = self._reserve(req, image_meta)
    File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 570, in _reserve
      image_meta = registry.add_image_metadata(req.context, image_meta)
    File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/api.py", line 166, in add_image_metadata
      return c.add_image(image_meta)
    File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 177, in add_image
      res = self.do_request("POST", "/images", body=body, headers=headers)
    File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 136, in do_request
      'exc_name': exc_name})
    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 119, in __exit__
      six.reraise(self.type_, self.value, self.tb)
    File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 121, in do_request
      **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 71, in wrapped
      return func(self, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 377, in do_request
      headers=copy.deepcopy(headers))
    File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 88, in wrapped
      return func(self, method, url, body, headers)
    File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 534, in _do_request
      raise exception.ServerError()
  ServerError: [G'\uff34\uff48\uff45 \uff52\uff45\uff51\uff55\uff45\uff53\uff54 \uff52eturned 500 Internal Server Error.\u0e0f\u0e39\u0130\u0131\uff5c]
  2015-08-18 04:19:22.393 15879 INFO eventlet.wsgi.server [req-73bb1b4a-0f6c-49ee-93e4-60bbccfda528 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 20a07ca65fc44285bd68287a605c8a53 - - -] 127.0.0.1 - - [18/Aug/2015 04:19:22] "POST /v1/images HTTP/1.1" 500 139 0.261323
  2015-08-18 04:24:09.339 15879 INFO eventlet.wsgi.server [req-29c582b9-5c72-45d7-9984-e85739b4edff f22a92a192f2446a860c2a27f16cfb3da4877b7442244a5fd4d4778311568b13 27fabb8213f84e50848f4df428e58437 -


  glance registry log:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 454, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 56, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 99, in __call__
      return request.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 99, in __call__
      return request.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 434, in __call__
      response = req.get_response(self._app)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 590, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 881, in __call__
      request, **action_args)
    File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 905, in dispatch
      return method(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 508, in wrapped
      return func(self, req, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/glance/registry/api/v1/images.py", line 438, in create
      "Got error: %s") % utils.exception_to_str(e))
    File "/usr/lib/python2.7/site-packages/oslo_i18n/_message.py", line 112, in __mod__
      unicode_mod = super(Message, self).__mod__(params)
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 8: ordinal not in range(128)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1487975/+subscriptions


References