Unit test case for unshelving a volume backed instance is not correct

Bug #1485429 reported by Xiaowei Qian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Xiaowei Qian

Bug Description

In case of volume backed instance, snapshot is not taken when an instance is shelved,
so "shelved_image_id" key is not set to the instance system metadata.

In the unit test case "test_unshelve_instance_schedule_and_rebuild_volume_backed
", set the "shelved_image_id" to the instance system metadata, which is not correct.

Changed in nova:
assignee: nobody → Xiaowei Qian (xiaow-qian)
Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/213633

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
status: In Progress → Confirmed
status: Confirmed → In Progress
tags: added: conductor
tags: added: nova-manage
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/213633
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5e821e364429153ba3685489ff2281966ce8496e
Submitter: Jenkins
Branch: master

commit 5e821e364429153ba3685489ff2281966ce8496e
Author: Xiaowei Qian <email address hidden>
Date: Wed Sep 16 10:35:33 2015 +0800

    Remove "shelved_image_id" key from instance system metadata

    In the unit test case "test_unshelve_instance_schedule_and_rebuild_volume_backed
    ", set the "shelved_image_id" to the instance system metadata,
    it tests the instance boot from image, not boot from volume.
    So it needs to remove "shelved_image_id" from the metadata,
    and remove "image_api.get" mock method.

    Change-Id: Ie501acaaa1c961a4b6f1f4ea9726a5b11b0de709
    Closes-Bug: #1485429
    Signed-off-by: Xiaowei Qian <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
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.