Comment 0 for bug 1805332

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

env: master branch, Glance using swift backend.

We hit a strange error, if we upload a large image (larger than 1G), the glance_store will hit a error:Unicode-objects must be encoded before hashing. But if the image is small enough, the error won't happen.

error log:
https://www.irccloud.com/pastebin/jP3DapNy/

After dig into the code, it appears that when chunk reading the image data, the date piece may be non-byte, so the checksum.updating will raise the error.

encoding the date piece to ensure it's byte can solve the problem.