[Bug 1805332] Re: [Swift backend] Upload image hit error: Unicode-objects must be encoded before hashing
Brian Murray
brian at ubuntu.com
Tue May 21 19:48:29 UTC 2019
Hello wangxiyuan, or anyone else affected,
Accepted python-glance-store into cosmic-proposed. The package will
build now and be available at https://launchpad.net/ubuntu/+source
/python-glance-store/0.26.1-0ubuntu2.1 in a few hours, and then in the
-proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-cosmic to verification-done-cosmic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-cosmic. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: python-glance-store (Ubuntu Cosmic)
Status: New => Fix Committed
** Tags added: verification-needed-cosmic
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1805332
Title:
[Swift backend] Upload image hit error: Unicode-objects must be
encoded before hashing
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive stein series:
Fix Released
Status in glance_store:
Triaged
Status in python-glance-store package in Ubuntu:
Fix Released
Status in python-glance-store source package in Cosmic:
Fix Committed
Status in python-glance-store source package in Disco:
Fix Released
Status in python-glance-store source package in Eoan:
Fix Released
Bug description:
[Impact]
If we upload a large image (larger than 1G), the glance_store will hit a Unicode error. To fix this a patch has been merged in upstream master and backported to stable rocky.
[Test Case]
Deploy glance related to swift-proxy using the object-store relation. Then attempt to upload a large image (not cirros)
$ openstack image create --public --file /home/ubuntu/images/bionic-server-cloudimg-amd64.img bionic-test
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
If the patch is manually applied and glance-api restarted then the
above command succeeds.
In order to avoid regression of existing consumers, the OpenStack team will
run their continuous integration test against the packages that are in
-proposed. A successful run of all available tests will be required before the
proposed packages can be let into -updates.
The OpenStack team will be in charge of attaching the output summary of the
executed tests. The OpenStack team members will not mark ‘verification-done’ until
this has happened.
[Regression Potential]
In order to mitigate the regression potential, the results of the
aforementioned tests are attached to this bug.
[Discussion]
n/a
[Original Description]
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1805332/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list