~philroche/simplestreams/1606606

Viewing all changes in revision 433.

glance: ignore inactive images

If connection to glance is broken during GlanceMirror.sync(), and image
would be left over in "status": "saving".

Glance itself tries to protect against that, however when it is restarted
(eg. "service glance-api restart"), it does not clean the image up.

This change makes load_product() ignore any images that do not have
"status": "active".  Images can only have deleted, active or saving
status.

Note that this isn't perfect. The image in "saving" state is never cleaned
up, but at least the resulting cloud works. If we want to clean up broken
images, it'd be hard to do on the simplestreams side (glance is better
placed to do that: it knows if anything is going on with any of them, eg.
is it being currently updated or not).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: