Reviewed: https://review.openstack.org/418217 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8c3148b7e9e41b3f85169f4804975cc5b92061d7 Submitter: Jenkins Branch: master
commit 8c3148b7e9e41b3f85169f4804975cc5b92061d7 Author: bhagyashris <[email protected]> Date: Thu May 5 14:00:06 2016 +0000 Fix filter doesn't support non-ascii characters When non-ascii characters is passed as filter parameter to "image-list" and "md-namespace-list" APIs then it returns HTTP 500 if glance service is running using Python2. This is because query parameters passed to the urlparse.urlencode method raises UnicodeEncodeError for non-ascii characters. Overridden params property of webob.request.BaseRequest in wsgi layer Request class to avoid encoding of request params at several places in case of Py2. Added a new class attribute 'encoded_params' which is initialized to encoded params dict when params property is called for the first time and in the subsequent calls this attribute is returned without requiring you to worry whether the params value are encoded or not. Closes-Bug: #1521193 Change-Id: If4497d42820aa4b8070666d2a1a4413411557f12 ** Changed in: glance Status: In Progress => 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/1521193 Title: Filters does not support non-ASCII value Status in Glance: Fix Released Status in Glance Client: Invalid Bug description: Glanceclient does not encode value "--property-filter" that call 500 error on wsgi server STEPS TO REPRODUCE: glance --debug image-list --property-filter name=Привет ACTUAL RESULT: curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}e2f09d062a40c2c9dd36331412527ca29c01f2c7' -H 'Content-Type: application/octet-stream' http://172.18.66.81:9292/v2/images?limit=2000&name=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82&sort_key=name&sort_dir=asc Request returned failure status 500. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 709, in main args.func(client, args) File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 182, in do_image_list utils.print_list(images, columns) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 183, in print_list for o in objs: File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 176, in list for image in paginate(url, page_size, limit): File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 108, in paginate resp, body = self.http_client.get(next_url) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 280, in get return self._request('GET', url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 272, in _request resp, body_iter = self._handle_response(resp) File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 93, in _handle_response raise exc.from_response(resp, resp.content) HTTPInternalServerError: HTTPInternalServerError (HTTP 500) HTTPInternalServerError (HTTP 500) logs on glance-server: http://paste.openstack.org/show/480358/ To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1521193/+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

