+++ This bug was initially created as a clone of Bug #2088688 +++ Description of problem: Re-trying an unshelve operation after the first one fails can result in the loss of the instance's original image ID. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create instance m1 with image=cirros. Show instance has image=cirros 2. Shelve instance m1 - Show instance has image=cirros, image_ref for instance in DB is cirros, image m1-shelved exists and is referenced by the instance's metadata key shelved_image_id 3. Unshelve instance m1 in a "no failure" scenario - instance is running, image = cirros in show server, image_ref is cirros in instance data, metadata keys associated with shelved delete -- THIS IS AS EXPECTED 4. Shelve the instance again - instance show has image = cirros, image_ref is cirros, metadata shelved_image_id -> m1_shelved 5. Force failures on computes (I stopped libvirt and renabled nova-compute on the nodes once they had gotten marked as disabled) 6. Unshelve the instance again - now the instance show has image as the m1_shelved, image_ref in the instance DB table is m1_shelved and the metadata keys associated with shelkved are still there 7. "Fix" nova-compute, unshelve the guest Actual results: 8. Instance active but instance show still has the m1_image ID even though its deleted, the image_ref in instance DB table is UUID for m1_image and the metadata properties for shelved are removed Expected results: Instance unshelves correctly and retains the image ID it had when it was originally shelved. Additional info:
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 16.2.4), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8794