Comment 0 for bug 1885003

Revision history for this message
Dan Smith (danms) wrote : Interrupted copy-to-store may corrupt a subsequent operation

This is a hypothetical (but very possible) scenario that will result in a corrupted image stored by glance. I don't have code to reproduce it, but discussion seems to indicate that it is possible.

Scenario:

1. Upload image to glance to one store, everything is good
2. Start an image_import(method='copy-to-store') to copy the image to another store
3. Power failure, network failure, or `killall -9 glance-api`
4. After the failure, re-request the copy-to-store
5. That glance worker will see the residue of the image in the staging directory, which is only partial because the process never finished, and will start uploading that to the new store
6. Upon completion, the image will appear in two stores, but one of them will be quietly corrupted