Wrong image ref after unshelve

Bug #1907216 reported by Lucian Petrut on 2020-12-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Lucian Petrut
Lucian Petrut

Bug Description

After an instance is unshelved, the instance image ref will point to the original image instead of the snapshot created during the shelving [1][2].

Subsequent instance operations will use the wrong image id. For example, in case of cold migrations, Hyper-V instances will be unable to boot since the differencing images will have the wrong base [3]. Other image related operations might be affected as well.

As pointed out by Matt Riedemann on the patch [1], Nova shouldn't set back the original image id, instead it should use the snapshot id.

[1] I3bba0a230044613e07122a6d122597e5b8d43438
[2] https://github.com/openstack/nova/blob/22.0.1/nova/compute/manager.py#L6625
[3] http://paste.openstack.org/raw/800822/

Changed in nova:
assignee: nobody → Lucian Petrut (petrutlucian94)
Changed in compute-hyperv:
assignee: nobody → Lucian Petrut (petrutlucian94)

Moving this to invalid based on the comments from Lucian on [1]

  I think this should be fixed at the Hyper-V driver level. The stashed image will be removed
  from Glance once the instance is unstashed, so there's no value in updating the Nova
  instance db record to point to it. In fact, users are probably interested in the original

[1] https://review.opendev.org/c/openstack/nova/+/765924

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Invalid
importance: Medium → Undecided
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers