Confirm migration fails when executed with "nova migrate" instead of "nova resize"

Bug #1136768 reported by Alessandro Pilotti
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Dan Smith

Bug Description

Cold migration fails when executed with "nova migrate <id>" and followed by "nova resize-confirm <id>" or "nova resize-revert <id>" with the following error:

http://paste.openstack.org/show/32680/

summary: - Confirm migration fails when run with "nova migrate" instead of "nova
- resize"
+ Confirm migration fails when executed with "nova migrate" instead of
+ "nova resize"
Dan Smith (danms)
Changed in nova:
assignee: nobody → Dan Smith (danms)
importance: Undecided → High
milestone: none → grizzly-rc1
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Feilong Wang (flwang) wrote :

This issue is caused by deleting the non-existed metadata with prefix "old_" in function confirm_resize().

Based on current implement, when calling "nova migrate <server>" with allow_resize_to_same_host=true and there is only one host, No metadata with prefix 'old_' will be saved. But on calling "resize-confirm", confirm_resize() will try to delete both the metadata with prefix 'old_' and 'new_ '. Then user will run into exception which said: "KeyError: 'old_instance_type_memory_mb'"

So I'm going to submit a fix to make sure the metadata with prefix "old_" will be savid in _finish_resize() to avoid the exception.

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/23419

Changed in nova:
assignee: Dan Smith (danms) → Fei Long Wang (flwang)
Dan Smith (danms)
Changed in nova:
assignee: Fei Long Wang (flwang) → Dan Smith (danms)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23315
Committed: http://github.com/openstack/nova/commit/5f3fa391ed499750ad68ad5b000b4e2e0a86978e
Submitter: Jenkins
Branch: master

commit 5f3fa391ed499750ad68ad5b000b4e2e0a86978e
Author: Dan Smith <email address hidden>
Date: Fri Mar 1 12:44:09 2013 -0500

    Fix instance type cleanup when doing a same-id migration

    Previously, we assumed that we were moving from one flavor to another during
    a migration (i.e. a resize). That assumption failed when a regular migration
    went to delete the old_ stashed instance types from system_metadata.

    This unifies the cleanup logic, which only gets performed if we're actually
    doing a resize.

    Fixes bug 1136768

    Change-Id: I0796864b044fc746583164e4a684f79dc431c137

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