log_http_response tracing when image name is multi-byte unicode

Bug #1369756 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Matt Riedemann

Bug Description

Basically the same issue as bug 1320655 but in a different method in the http.py module:

http://logs.openstack.org/35/118135/5/gate/gate-tempest-dsvm-full/8e230bc/logs/screen-n-cpu.txt.gz#_2014-09-10_14_27_45_271

2014-09-10 14:27:45.271 28251 INFO nova.compute.manager [-] [instance: 3634459f-2177-4a17-bc57-074610d2f6e5] VM Started (Lifecycle Event)
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 705, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/opt/stack/new/nova/nova/openstack/common/log.py", line 632, in format
    record.msg = six.text_type(record.msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 319: ordinal not in range(128)
Logged from file http.py, line 133

Matt Riedemann (mriedem)
Changed in python-glanceclient:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

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

Reviewed: https://review.openstack.org/121683
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=ba19a534b7576846d542f9c6a4d6769253c603e8
Submitter: Jenkins
Branch: master

commit ba19a534b7576846d542f9c6a4d6769253c603e8
Author: Matt Riedemann <email address hidden>
Date: Mon Sep 15 14:55:28 2014 -0700

    Handle UnicodeDecodeError in log_http_response

    Similar to commit dec9c9f35 and log_curl_request,
    this ignores decoding errors when logging response
    headers by passing errors='ignore' to safe_encode.

    Change-Id: Ic915a7d8334e9473f300c9db670a3a8f5cda8976
    Closes-Bug: #1369756

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz)
Changed in python-glanceclient:
status: Fix Committed → Fix Released
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.