Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2088688

Summary: [OSP17.0] Original image_ref is lost after a failed unshelve
Product: Red Hat OpenStack Reporter: jzaher
Component: openstack-novaAssignee: OSP DFG:Compute <osp-dfg-compute>
Status: CLOSED ERRATA QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: high Docs Contact:
Priority: low    
Version: 17.0 (Wallaby)CC: alifshit, bgibizer, dasmith, eglynn, jhakimra, kchamart, sbauza, sgordon, smooney, vromanso
Target Milestone: z1Keywords: Patch, Triaged
Target Release: 17.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-nova-23.2.2-0.20221121200753.7074ac0.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2088690 (view as bug list) Environment:
Last Closed: 2023-01-25 12:28:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2088690    

Description jzaher 2022-05-20 05:27:17 UTC
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:

Comment 13 errata-xmlrpc 2023-01-25 12:28:50 UTC
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 (Red Hat OpenStack Platform 17.0.1 bug fix and enhancement advisory), 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-2023:0271