Image download fails with corrupt image hash mismatch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
New
|
Undecided
|
Unassigned |
Bug Description
Glance backend is Cinder and Cinder backend is RBD
Reproducer:
1. Create a volume from image (cirros in my case)
2. Launch an instance from the bootable volume
3. write a sparse file to the volume
dd if=/dev/zero of=sparsefile bs=1M count=1 seek=1K
4. Delete the instance (needed for next operation)
5. Upload the volume to image (only possible if volume is in available state)
6. Download the image
glance image-download <image-id> --file testfile.img
We hit the following error
[Errno 32] Corrupt image download. Hash was 684f9d8384ad816
I think it might be due to the inconsistency writing the sparse files.