Bug 2088690 - [OSP16.2] Original image_ref is lost after a failed unshelve
Summary: [OSP16.2] Original image_ref is lost after a failed unshelve
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.2 (Train)
Hardware: All
OS: Linux
low
high
Target Milestone: z5
: 16.2 (Train on RHEL 8.4)
Assignee: OSP DFG:Compute
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On: 2088688
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-20 05:33 UTC by jzaher
Modified: 2023-03-21 19:53 UTC (History)
11 users (show)

Fixed In Version: openstack-nova-20.6.2-2.20221005185229.6786e96.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2088688
Environment:
Last Closed: 2022-12-07 19:22:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 842963 0 None NEW Fix instance's image_ref lost on failed unshelving 2022-11-14 19:29:02 UTC
Red Hat Issue Tracker OSP-15327 0 None None None 2022-05-20 05:36:20 UTC
Red Hat Product Errata RHBA-2022:8794 0 None None None 2022-12-07 19:23:16 UTC

Description jzaher 2022-05-20 05:33:53 UTC
+++ 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:

Comment 14 errata-xmlrpc 2022-12-07 19:22:28 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 (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


Note You need to log in before you can comment on or make changes to this bug.