Comment 3 for bug 1933966

Revision history for this message
Felipe Reyes (freyes) wrote :

The exception comes from simplestreams library.

The exception is thrown when the md5 checksums don't match[0]:

OSError: Invalid glance image: 3c4b49a4-a4c9-4b84-95eb-dbf0ce3d1e83. Expected size=172883968 md5=None. Found size=172883968 md5=078ff054bceec76f66ffeaa748f9f2e5.

md5=None <- this would mean the variable `new_md5` is None[1], this variable is set to whatever returns GlanceMirror.download_image()[2], the sizes match, so this shouldn't be related to a download issue.

The md5 checksum could come from 2 different places[3], if the class was configured with a "hook" to modify the images or not, when there is no hook the md5sum comes from the structure stored in `flattened_img_data`[4], IIUC this information comes from the published streams that we are using as a source.

[0] https://git.launchpad.net/simplestreams/tree/simplestreams/mirrors/glance.py#n531
[1] https://git.launchpad.net/simplestreams/tree/simplestreams/mirrors/glance.py#n502
[2] https://git.launchpad.net/simplestreams/tree/simplestreams/mirrors/glance.py#n363
[3] https://git.launchpad.net/simplestreams/tree/simplestreams/mirrors/glance.py#n390
[4] https://git.launchpad.net/simplestreams/tree/simplestreams/mirrors/glance.py#n453