Cannot live block migrate an instance without shared storage

Bug #1193359 reported by Rohit Karajgi
74
This bug affects 16 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Chet Burgess
Declined for Havana by Alan Pevec
Grizzly
Fix Released
High
Unassigned

Bug Description

In the current trunk (Havana): commit d8c9864d95bec6d2babb2cb5a2aeeb284fca4834,

Live migration without shared storage (block migration) is failing.

Problem:
A check in pre_live_migration at the destination for the instance existence fails and the respective instance directory gets created.
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L3367

The same check is performed on the destination during pre_block_migration, the instance directory is found and an exception
is raised, and migration fails :
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L3422

Tags: ntt
Changed in nova:
status: New → Confirmed
Revision history for this message
Chet Burgess (cfb-n) wrote :

I can confirm this too. We hit this a few days ago. I have a fix for this already I've been meaning to submit.

Changed in nova:
assignee: nobody → Chet Burgess (cfb-n)
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/34661

Changed in nova:
status: Confirmed → In Progress
description: updated
Hans Lindgren (hanlind)
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/34661
Committed: http://github.com/openstack/nova/commit/659ec75eaf052742a6269e0aae258f1c874749f7
Submitter: Jenkins
Branch: master

commit 659ec75eaf052742a6269e0aae258f1c874749f7
Author: Chet Burgess <email address hidden>
Date: Wed Jul 3 17:00:37 2013 +0000

    Check instance on dest once during block migration

    During live block migrations both pre_live_migration and
    pre_block_migration check for the presence of the instance on
    the destination and create the instance dir if it doesn't exist.

    As a result the call to pre_block_migration always fails as
    pre_live_migration has already created the instance dir on the
    destination.

    As it turns out the pre_block_migration call is completely
    unnecessary. The libvirt driver is the only driver that uses the
    call and the work it does can easily be done in the existing
    pre_live_migration call. In order to streamline things we
    completely remove the pre_block_migration call from all
    drivers. Additionally we update the function definition for
    pre_live_migration to pass needed disk info down to the
    virt drivers.

    Fixes bug: #1193359
    Change-Id: Id9dfe482db3471d6a1b9b6c7d59a5ddc48775d7f

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Xavier Queralt (xqueralt-deactivatedaccount) wrote :

This bug also affects grizzly

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/42588

Alan Pevec (apevec)
Changed in nova:
importance: Undecided → High
tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/42588
Committed: http://github.com/openstack/nova/commit/53a57e0aaac23798a6f1b1619f4c767e1621850e
Submitter: Jenkins
Branch: stable/grizzly

commit 53a57e0aaac23798a6f1b1619f4c767e1621850e
Author: Chet Burgess <email address hidden>
Date: Wed Jul 3 17:00:37 2013 +0000

    Check instance on dest once during block migration

    During live block migrations both pre_live_migration and
    pre_block_migration check for the presence of the instance on
    the destination and create the instance dir if it doesn't exist.

    As a result the call to pre_block_migration always fails as
    pre_live_migration has already created the instance dir on the
    destination.

    As it turns out the pre_block_migration call is completely
    unnecessary. The libvirt driver is the only driver that uses the
    call and the work it does can easily be done in the existing
    pre_live_migration call. In order to streamline things we
    completely remove the pre_block_migration call from all
    drivers. Additionally we update the function definition for
    pre_live_migration to pass needed disk info down to the
    virt drivers.

    Fixes bug: #1193359

    (cherry picked from commit 659ec75eaf052742a6269e0aae258f1c874749f7)

    Conflicts:
     nova/compute/manager.py
     nova/tests/test_libvirt.py
     nova/virt/libvirt/driver.py
     nova/virt/xenapi/driver.py

    Change-Id: Id9dfe482db3471d6a1b9b6c7d59a5ddc48775d7f

Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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