[Swift backend] Upload image hit error: Unicode-objects must be encoded before hashing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
Medium
|
Unassigned | ||
Rocky |
Fix Released
|
Medium
|
Unassigned | ||
Stein |
Fix Released
|
Medium
|
Unassigned | ||
glance_store |
Triaged
|
High
|
wangxiyuan | ||
python-glance-store (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned |
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/
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-
error log:
https:/
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.
Changed in glance-store: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in python-glance-store (Ubuntu Disco): | |
status: | New → Triaged |
Changed in python-glance-store (Ubuntu Eoan): | |
status: | New → Triaged |
Changed in python-glance-store (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in python-glance-store (Ubuntu Eoan): | |
importance: | Undecided → Medium |
description: | updated |
no longer affects: | cloud-archive/rocky |
https:/ /review. openstack. org/#/c/ 620234/