2017-03-02T20:18:59.661653+00:00 node-1 glance-api: 2017-03-02 20:18:59.658 20687 DEBUG swiftclient [req-529764cb-284d-4c4a-ba84-acd6b720c45f 2b43ef59fda541b68bba7d60c26a0ee1 36a79e
095bea4dbeaa589008076f5033 - default default] REQ: curl -i http://10.109.1.9:8080/swift/v1/glance?format=json&prefix=4f81d888-6e65-4cf5-81da-4f86f2e1fb97- -X GET -H "Accept-Encoding
: gzip" -H "X-Auth-Token: gAAAAABYuH4zi6N_..." http_log /usr/lib/python2.7/dist-packages/swiftclient/client.py:164
2017-03-02T20:18:59.661855+00:00 node-1 glance-api[20416]: Traceback (most recent call last):
2017-03-02T20:18:59.661952+00:00 node-1 glance-api[20416]: File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
2017-03-02T20:18:59.662042+00:00 node-1 glance-api[20416]: msg = self.format(record)
2017-03-02T20:18:59.662138+00:00 node-1 glance-api[20416]: File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
2017-03-02T20:18:59.662209+00:00 node-1 glance-api[20416]: return fmt.format(record)
2017-03-02T20:18:59.662287+00:00 node-1 glance-api[20416]: File "/usr/lib/python2.7/dist-packages/oslo_log/formatters.py", line 297, in format
2017-03-02T20:18:59.662370+00:00 node-1 glance-api[20416]: return logging.Formatter.format(self, record)
2017-03-02T20:18:59.662440+00:00 node-1 glance-api[20416]: File "/usr/lib/python2.7/logging/__init__.py", line 476, in format
2017-03-02T20:18:59.662508+00:00 node-1 glance-api[20416]: raise e
2017-03-02T20:18:59.662577+00:00 node-1 glance-api[20416]: UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 12: ordinal not in range(128)
Ugh, I never should have even tried with https:/ /github. com/openstack/ python- swiftclient/ commit/ f728027 -- API responses are so tiny, there's practically no benefit to gzipping, it just burns CPU :-/
I'm not clear on why anything's getting decoded, though -- it looks like this is py2, so we're trying to interpolate bytes into bytes. What version of oslo.log is that? Following https:/ /github. com/openstack/ oslo.log/ commit/ 991d8f0 (or its mitaka counterpart, https:/ /github. com/openstack/ oslo.log/ commit/ a2e7f65) I thought that should Just Work™? It won't be particularly pretty, but it shouldn't go raising UnicodeErrors...
Regardless, something like https:/ /review. openstack. org/#/c/ 442342/ will be necessary, or py3 logging (which *would* have record.msg as unicode) will break like this.