← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1180344] Re: the api doesn't work when send non-english parameters to the api

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-1

-- 
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/1180344

Title:
  the api doesn't work when send non-english parameters to the api

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  the api can work well against english parameter

  but when send non-english parameters to the api, the api doesn't work
  http://127.0.0.1:8774/v2/4856cc519c5543c4b70e6b4cceab9cb1/servers

  Body

  {"server": {"min_count": 1, "flavorRef": "1", "name": "概念",
  "imageRef": "10bab10c-1304-47db-b5b0-24c735eddc70", "max_count": 1}}

  Response

      <computeFault code="500" xmlns="http://docs.openstack.org/compute/api/v1.1";>
      <message>The server has either erred or is incapable of performing the requested operation.</message>
      </computeFault>

  in /var/log/nova/api.log, can see
  ERROR [nova.api.openstack] Caught error: 'ascii' codec can't decode byte 0xe4 in position 55: ordinal not in range(128)
  Traceback (most recent call last):
    File "/opt/stack-havana/nova/nova/api/openstack/__init__.py", line 81, in __call__
      return req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
      return resp(environ, start_response)
    File "/opt/stack-havana/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
      return self.app(env, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
      return resp(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
      return resp(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
      return resp(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack-havana/nova/nova/api/openstack/wsgi.py", line 899, in __call__
      content_type, body, accept)
    File "/opt/stack-havana/nova/nova/api/openstack/wsgi.py", line 919, in _process_stack
      LOG.debug(_("Action: '%(action)s', body: %(body)s") % locals())
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 55: ordinal not in range(128)

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