Original image_ref is lost after a failed unshelve

Bug #1934094 reported by Pierre-Samuel LE STANG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Pierre-Samuel LE STANG

Bug Description

Description
===========
When an unshelve fails the original image_ref of an instance is lost and replaced by the image id of the shelved image.

Steps to reproduce
==================
1/ Shelve an instance
2/ Unshelve the instance and abort it (kill the process on compute side) to generate an error
3/ If you unshelve again successfully the instance image_ref is the id of the shelved image and is marked as not found because it was deleted at the end of the unshelve process

Expected result
===============
Expect the instance image_ref to be the original image_ref

Actual result
=============
the instance image_ref is the one of the shelved image

Bug identified on Newton and Stein but seems still present on latest release

Changed in nova:
assignee: nobody → Pierre-Samuel LE STANG (pslestang)
Revision history for this message
Lee Yarwood (lyarwood) wrote :

I'm not sure that killing n-cpu is a valid usecase here, unshelve is a cast so you can't expect anything to cleanup outside of the n-cpu process you just killed.

Can you provide an example trace of the second unshelve request?

Changed in nova:
status: New → Incomplete
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/807551

Changed in nova:
status: Incomplete → In Progress
Revision history for this message
Pierre-Samuel LE STANG (pslestang) wrote :

killing the process on compute side is just a way to produce an error.

I just pushed a fix for that
https://review.opendev.org/c/openstack/nova/+/807551

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/812646

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/812646
Committed: https://opendev.org/openstack/nova/commit/78e10f5f14a018fd1d96ea242923631459acb62c
Submitter: "Zuul (22348)"
Branch: master

commit 78e10f5f14a018fd1d96ea242923631459acb62c
Author: Pierre-Samuel Le Stang <email address hidden>
Date: Mon Sep 6 08:44:37 2021 +0000

    Reproducer unit test for bug 1934094

    Related bug: #1934094

    Signed-off-by: Pierre-Samuel Le Stang <email address hidden>
    Change-Id: I8f7f26e10519c87e06de47bd4d9845151f889129

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/807551
Committed: https://opendev.org/openstack/nova/commit/518b952bdeb6ec29252b56527b8c8d7b32abe1b5
Submitter: "Zuul (22348)"
Branch: master

commit 518b952bdeb6ec29252b56527b8c8d7b32abe1b5
Author: Pierre-Samuel Le Stang <email address hidden>
Date: Mon Sep 6 08:44:37 2021 +0000

    Fix instance's image_ref lost on failed unshelving

    Closes-Bug: #1934094

    Signed-off-by: Pierre-Samuel Le Stang <email address hidden>
    Change-Id: Id908a7224ff3378b3b51726bbfa8b5805d38ca59

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 25.0.0.0rc1

This issue was fixed in the openstack/nova 25.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/xena)

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/nova/+/842922

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/nova/+/842923

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/842925

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/842926

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/victoria)

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/842952

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/842953

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/ussuri)

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/842955

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/842956

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/842962

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/842963

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/nova/+/842922
Committed: https://opendev.org/openstack/nova/commit/ec73ff1f78714eb62686d0f39fc4e79ffdf559af
Submitter: "Zuul (22348)"
Branch: stable/xena

commit ec73ff1f78714eb62686d0f39fc4e79ffdf559af
Author: Pierre-Samuel Le Stang <email address hidden>
Date: Mon Sep 6 08:44:37 2021 +0000

    Reproducer unit test for bug 1934094

    Related bug: #1934094

    Signed-off-by: Pierre-Samuel Le Stang <email address hidden>
    Change-Id: I8f7f26e10519c87e06de47bd4d9845151f889129
    (cherry picked from commit 78e10f5f14a018fd1d96ea242923631459acb62c)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/nova/+/842923
Committed: https://opendev.org/openstack/nova/commit/076f95371a093a0e594c0d08e410676c9a73c9d0
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 076f95371a093a0e594c0d08e410676c9a73c9d0
Author: Pierre-Samuel Le Stang <email address hidden>
Date: Mon Sep 6 08:44:37 2021 +0000

    Fix instance's image_ref lost on failed unshelving

    Closes-Bug: #1934094

    Signed-off-by: Pierre-Samuel Le Stang <email address hidden>
    Change-Id: Id908a7224ff3378b3b51726bbfa8b5805d38ca59
    (cherry picked from commit 518b952bdeb6ec29252b56527b8c8d7b32abe1b5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 24.2.0

This issue was fixed in the openstack/nova 24.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/train)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/842962
Reason: stable/train branch of nova projects' have been tagged as End of Life. All open patches have to be abandoned in order to be able to delete the branch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/842963
Reason: stable/train branch of nova projects' have been tagged as End of Life. All open patches have to be abandoned in order to be able to delete the branch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/ussuri)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/842956
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/842955
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/victoria)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/842953
Reason: stable/victoria branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/842952
Reason: stable/victoria branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/wallaby)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/842926
Reason: stable/wallaby branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/842925
Reason: stable/wallaby branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.