Incorrect error message when creating unicode env

Bug #1443350 reported by Kirill Zaitsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Li Xipeng
Kilo
Fix Committed
Undecided
Kirill Zaitsev

Bug Description

When creating an env with a unicode name via client murano returns a 400 error, but the message is misleading

$ murano environment-create энвайронмент
{"code": 400, "explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "error": {"traceback": "Traceback (most recent call last):\n File \"/Users/teferi/murano/murano/murano/api/middleware/fault.py\", line 129, in process_request\n return req.get_response(self.application)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1320, in send\n application, catch_exc_info=False)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1284, in call_application\n app_iter = application(self.environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py\", line 634, in __call__\n return self._call_app(env, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py\", line 554, in _call_app\n return self._app(env, _fake_start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 191, in __call__\n response = req.get_response(self.application)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1320, in send\n application, catch_exc_info=False)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1284, in call_application\n app_iter = application(self.environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/paste/urlmap.py\", line 203, in __call__\n return app(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/routes/middleware.py\", line 136, in __call__\n response = self.app(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 370, in __call__\n action_result = self.execute_action(action, request, **action_args)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 384, in execute_action\n return self.dispatch(self.controller, action, request, **action_args)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 393, in dispatch\n return method(*args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/api/v1/request_statistics.py\", line 56, in wrap\n result = func(*args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/api/v1/environments.py\", line 57, in create\n LOG.debug('ENV NAME: {0}>'.format(body['name']))\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128)\n", "message": "'ascii' codec can't encode characters in position 0-11: ordinal not in range(128)", "type": "UnicodeEncodeError"}, "title": "Bad Request"} (HTTP 400)

Changed in murano:
milestone: none → liberty-1
status: New → Confirmed
importance: Undecided → High
Li Xipeng (lixipeng)
Changed in murano:
assignee: nobody → Li Xipeng (lixipeng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/181703

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/181703
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=efee9edbfbead3a0b9161e292ab52d8f0eae9322
Submitter: Jenkins
Branch: master

commit efee9edbfbead3a0b9161e292ab52d8f0eae9322
Author: Li Xipeng <email address hidden>
Date: Sat May 9 13:24:16 2015 +0800

    Fix incorrect method when creating unicode env

    It is better to use 'unicode' method to parse
    env name to string when call env creating API.

    Closes-Bug: 1443350

    Change-Id: I2fbce6c68ce71f9607d261a01e3a913ddefd5725

Changed in murano:
status: In Progress → Fix Committed
tags: added: kilo-backport-potential
Changed in murano:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/198491

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/kilo)

Reviewed: https://review.openstack.org/198491
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=a5b17d876a11dbe35de1c499ab6f460e8559f175
Submitter: Jenkins
Branch: stable/kilo

commit a5b17d876a11dbe35de1c499ab6f460e8559f175
Author: Li Xipeng <email address hidden>
Date: Sat May 9 13:24:16 2015 +0800

    Fix incorrect method when creating unicode env

    It is better to use 'unicode' method to parse
    env name to string when call env creating API.

    Closes-Bug: 1443350

    Change-Id: I2fbce6c68ce71f9607d261a01e3a913ddefd5725
    (cherry picked from commit efee9edbfbead3a0b9161e292ab52d8f0eae9322)

tags: added: in-stable-kilo
Changed in murano:
milestone: liberty-1 → 1.0.0
Changed in murano:
milestone: 1.0.0 → 1.0.1
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano 2015.1.1

This issue was fixed in the openstack/murano 2015.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/murano 2015.1.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.