LVM backed instance migration does not copy disk

Bug #1270305 reported by Dan Genin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Dan Genin

Bug Description

When an LVM backed instance is migrated (in Devstack) the instance's disk is not copied to the destination compute node and the is not deleted from the source compute node.

Observed with nova 3912d7aae21dfff5a42dd71bd45ef5c5f3b1a82b and devstack 78411958fd086acc0270c2380dd61f03ebd1f451. Devstack was setup for a multi-node config following directions at http://devstack.org/guides/multinode-lab.html.

LVM backend configured with
[libvirt]
images_type = lvm
images_volume_group = nova-lvm

To reproduce the bug
1
. Launch an instance
2. Create a test file and sync the disk in the instance
4. Sync the disk on the host and verify that the test file was written to disk by grepping the strings in /dev/nova-lvm/instance_..._disk for the test file contents
5. Initiate instance migration using Horizon interface
6. Confirm migration
7. On the destination host check that the test file is missing by grepping for it in /dev/nova-lvm/instance_..._disk
8. Check that the original LVM volume is still there by listing /dev/nova-lvm/

Dan Genin (daniel-genin)
description: updated
summary: - LVM backed instance migration does not work
+ LVM backed instance migration does not copy disk
description: updated
Revision history for this message
Dan Genin (daniel-genin) wrote :

Based on LibvirtDriver migration code, specifically migrate_disk_and_power_off(), it does not look like migration for LVM backed instances was ever implemented. The unit tests for migrate_disk_and_power_off(), also, cover only raw and qcow2 backed instances.

Dan Genin (daniel-genin)
Changed in nova:
status: New → Invalid
Dan Genin (daniel-genin)
Changed in nova:
status: Invalid → New
Revision history for this message
John Garbutt (johngarbutt) wrote :

The bug here is that you should get a not implemented exception or similar.

To implement the feature, its a blueprint I guess.

tags: added: libvirt
Changed in nova:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Dan Genin (daniel-genin) wrote :

Notice that because the disk is not deleted, repeated migrations will cause resource depletion.

Revision history for this message
mouadino (mouadino) wrote :

Actually we have witnessed the same thing and i reported it in this bug https://bugs.launchpad.net/nova/+bug/1282643 but for you the migration **did work**, else it should **not** have worked if my conclusion in the bug report that i mentioned are correct, right ?

Revision history for this message
Dan Genin (daniel-genin) wrote :

I would say that it worked half-way -- an identical, in terms of VM specification, instance was recreated on the destination host but none of the data was moved. This bug relates to "cold" migration, whereas it appears that you ran into a similar problem with live migration. The codepaths for the two are distinct, which may explain why I observed an instance being respawned on the destination host. Both bugs appear to be the result of missing migration code for LVM.

Dan Genin (daniel-genin)
Changed in nova:
assignee: nobody → APL Development team for OpenStack (openstack-apl)
assignee: APL Development team for OpenStack (openstack-apl) → Dan Genin (daniel-genin)
Changed in nova:
status: Triaged → In Progress
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit e24f333cd5d3667a15c36ac502304bfb5a0e21df
Author: Daniel Genin <email address hidden>
Date: Mon Jul 28 17:12:40 2014 -0400

    Raises NotImplementedError for LVM migration.

    Currently migration of an LVM backed instance results in a new
    instance being launched on the destination node, but the instance
    disk is neither copied to the destination nor deleted on the
    origin node. The problem is addressed by raising a NotImplementedError.

    Closes-Bug: #1270305
    Closes-Bug: #1245595
    Closes-Bug: #1241866
    Change-Id: I8010230b1aa5ddc322d0c93dd916b7700c25ab81
    DocImpact

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