Bug 2011771
Summary: | [OSP 18] n-cpu uploads volume snapshot images with an empty string as data to Glance causing bogus hashes to be calculated | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Lee Yarwood <lyarwood> |
Component: | openstack-nova | Assignee: | OSP DFG:Compute <osp-dfg-compute> |
Status: | CLOSED MIGRATED | QA Contact: | OSP DFG:Compute <osp-dfg-compute> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 17.0 (Wallaby) | CC: | alifshit, astupnik, dasmith, eglynn, jhakimra, kchamart, sbauza, sgordon, vromanso |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-01-10 20:31:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lee Yarwood
2021-10-07 10:43:12 UTC
I may be wrong here, but after taking a look at https://github.com/openstack/nova/blob/1c502ebaec29615f08d4af7dc6680f3141d70e67/nova/image/glance.py#L632-L644 and trying few things in my lab, it looks like that this bug report is a bit inconsistent: - glance create images in two steps: first there is a POST call that creates an image [1], then there is PUT call that uploads data [2]. Image is stuck in queued status until data is uploaded - when it comes to PUT call [2], data is expected and AFAIU it can't really be none - as a result, providing an empty string looks like the simplest solution to move image from queued state to active. And it is actually stated in https://github.com/openstack/nova/blob/1c502ebaec29615f08d4af7dc6680f3141d70e67/nova/image/glance.py#L632-L644 I tried to set data to None instead of empty string. As a result, data is not uploaded and image is stuck in queued state https://github.com/openstack/nova/blob/1c502ebaec29615f08d4af7dc6680f3141d70e67/nova/image/glance.py#L663-L664 Obviously this makes image unusable. So it looks like bugreport is a bit ambiguous or requires significant changes in Nova/Glance. [1] https://docs.openstack.org/api-ref/image/v2/index.html?expanded=upload-binary-image-data-detail#create-image [2] https://docs.openstack.org/api-ref/image/v2/index.html?expanded=upload-binary-image-data-detail#upload-binary-image-data |