encoding error should be notified at least as log.error

Bug #1123048 reported by Kun Huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Kun Huang

Bug Description

https://github.com/openstack/swift/blob/master/swift/common/bufferedhttp.py#L133

if isinstance(path, unicode):
        try:
            path = path.encode("utf-8")
        except UnicodeError:
            pass # what should I do?

Before pass this error, we should log it, in error or warning level.
It'll be more dangerous when error happens and no direct origin information lives in log.
We should log here for potential debuging.

Changed in swift:
assignee: nobody → Kun Huang (academicgareth)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

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

Reviewed: https://review.openstack.org/21778
Committed: http://github.com/openstack/swift/commit/f4a09ebf478ecb69a95c7920048b69184a7ad033
Submitter: Jenkins
Branch: master

commit f4a09ebf478ecb69a95c7920048b69184a7ad033
Author: Kun Huang <email address hidden>
Date: Tue Feb 12 21:35:53 2013 +0800

    log message in exception level when path encoding errors happen.

    Original code is kind of except-pass. This will ignore the error
    occurs in process of encoding path. And if such error happened
    without any information in logs, developer have to debug in a
    long distance from error stack. That's wasting time, so there
    should be a logging message here.

    Fixes: bug #1123048
    Change-Id: I7941b524e936241fb8d62fad5ad90de3daffe5e7

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.8.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 1.8.0-rc1 → 1.8.0
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.