block live migration writes wrong libvirt.xml

Bug #1271780 reported by Jay Lee
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Jay Lee
Havana
Fix Released
High
Yaguang Tang

Bug Description

release: stable/havana, 2013.2.1
virt driver: libvirt
volume driver: cinder.volume.san.HpSanISCSIDriver

when excute (live) block migration for vm made by bootable volume, method post_live_migration_at_destination write a libvirt.xml in destination host.
but it missed block disk information so moved libvirt.xml always has a wrong disk information.

example)
$ cinder create --image-id xxxx --display_name cirros_boot_volume 10
it return volume id yyyy

$ nova boot test_vm --flavor 1 --boot-volume yyyy
it makes vm and libvirt.xml has different information from common vm.
...
  <devices>
    <disk type="block" device="disk">
      <driver name="qemu" type="raw" cache="none"/>
      <source dev="/dev/disk/by-path/ip-san_host:3260-iscsi-iqn.xxxx-739918ef-20aa-45ae-8c86-a923d755942a-lun-0"/>
      <target bus="virtio" dev="vda"/>
      <serial>739918ef-20aa-45ae-8c86-a923d755942a</serial>
    </disk>
...

$ nova live-migration --block-migrate <vm uuid> <destination host>
After migrate, libvirt.xml at destination host has common disk information.
...
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/c59f0510-1549-4249-993c-0fb79cc2ccab/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
...

Tags: libvirt
Jay Lee (hyangii)
tags: added: libvirt
Changed in nova:
assignee: nobody → Jay Lee (hyangii)
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/68537

Changed in nova:
status: New → In Progress
Revision history for this message
darkyat (darkyat) wrote :

The same thing happens to me using cinder.volume.drivers.glusterfs.GlusterfsDriver.

Changed in nova:
importance: Undecided → High
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 0486647e1c85947bc48cbdd279b3f49824a6e692
Author: Jay Lee <email address hidden>
Date: Thu Jan 23 01:51:42 2014 +0000

    Use block_device_info at post_live_migration_at_destination

    post_live_migration_at_destination make libvirt.xml to destination
    host. when execute (live) block migration for vm made by bootable
    volume, method post_live_migration_at_destination write a
    libvirt.xml in destination host.
    but it missed block disk information so moved libvirt.xml always
    has a wrong disk information.
    I add block_device_info in blockinfo.get_disk_info at
    post_live_migration_at_destination.
    This change will make libvirt.xml with valid block disk information.

    Change-Id: I31b3f2ef5f03f9ef61524bdb7ae089b18e4cd254
    Closes-Bug: 1271780

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Yaguang Tang (heut2008) wrote :

patch for stable/havana is https://review.openstack.org/#/c/70993/

tags: removed: havana-backport-potential
Revision history for this message
Jay Lee (hyangii) wrote :

2013.2.2 milestone page doesn't contain this bug fix, How this patch to join the branch stable/havana?

Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/70993
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b508376f4309ea15cd1299480a1193055abbbf99
Submitter: Jenkins
Branch: stable/havana

commit b508376f4309ea15cd1299480a1193055abbbf99
Author: Jay Lee <email address hidden>
Date: Thu Jan 23 01:51:42 2014 +0000

    Use block_device_info at post_live_migration_at_destination

    post_live_migration_at_destination make libvirt.xml to destination
    host. when execute (live) block migration for vm made by bootable
    volume, method post_live_migration_at_destination write a
    libvirt.xml in destination host.
    but it missed block disk information so moved libvirt.xml always
    has a wrong disk information.
    I add block_device_info in blockinfo.get_disk_info at
    post_live_migration_at_destination.
    This change will make libvirt.xml with valid block disk information.

    Closes-Bug: 1271780
    (cherry picked from commit 0486647e1c85947bc48cbdd279b3f49824a6e692)

    Conflicts:
     nova/tests/virt/libvirt/test_libvirt.py
     nova/virt/libvirt/driver.py

    Change-Id: I31b3f2ef5f03f9ef61524bdb7ae089b18e4cd254

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.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.