[openstacksdk] Create image doesn't validate checksum correctly using sha256 algorithm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
New
|
Undecided
|
Prashant Bhole |
Bug Description
I have set config option ``hashing_
Now, I'm trying to create an image using openstacksdk.
I have set hash value of the image to sha256 parameter of create_image method but it fails with an error "Image checksum verification failed".
Reason: glance store calculates checksum using md5 algorithm and it calculates owner_specified
checksum = data.get(
if checksum:
valid = (checksum == md5 or checksum == sha256)
if not valid:
raise Exception('Image checksum verification failed')
IMO, except md5 algorithm, it should compare sha256 with the os_hash_value that's calculated and set by glance for an image.
for cirros-
md5 checksum is 443b7623e27ecf0
sha256 checksum is a8dd75ecffd4cdd
If I pass sha256 parameter to create_image as a8dd75ecffd4cdd
summary: |
- [openstacksdk] Create image doesn't validate checksum using sha256 - algorithm + [openstacksdk] Create image doesn't validate checksum correctly using + sha256 algorithm |
Changed in glance: | |
assignee: | nobody → Prashant Bhole (pbhole) |
affects: | glance → python-openstacksdk |