Comment 7 for bug 1678018

Revision history for this message
Alistair Coles (alistair-coles) wrote :

I cannot reproduce this bug as reported i.e. with non-ascii characters in an object name, but I can get the symptoms by putting non-ascii chars in an x-object-meta metadata value [1]

The object path is quoted here [2] before being passed to send_put method so it is fine to decode as utf8.

But if there is non-ascii in a metadata value AND a metadata key that is unicode (as we have seen EC writes into diskfle) then the send_put will blow up when it attempts to join those into a string, at the same line as reported, but the "culprit" is not the object name.

[1]
Apr 7 18:32:12 localhost object-reconstructor: 127.0.0.1:6020/sdb6/390 EXCEPTION in ssync.Sender: #012Traceback (most recent call last):#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 126, in __call__#012 self.updates()#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 346, in updates#012 self.send_put(url_path, df_alt)#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 410, in send_put#012 msg = '\r\n'.join(msg) + '\r\n\r\n'#012UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

[2] https://github.com/openstack/swift/blob/cff7455a689e452d12e85eec69137b3a3e0ec803/swift/obj/ssync_sender.py#L335-L336