to_xml should be used in post_live_migration_at_destination method

Bug #1231215 reported by wangpan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
wangpan

Bug Description

in the post_live_migration_at_destination method, the to_xml method is called but the return value never be used, and the comment say that the reason is 'the uuid is not included in to_xml() result'.
but I think the uuid is already included in to_xml() result now, so we may refactor post_live_migration_at_destination method and change it to use the correct way to get the xml of migrated instance.

# In case of block migration, destination does not have
# libvirt.xml
disk_info = blockinfo.get_disk_info(CONF.libvirt_type,
                                    instance)
self.to_xml(instance, network_info, disk_info,
            block_device_info, write_to_disk=True)
# libvirt.xml should be made by to_xml(), but libvirt
# does not accept to_xml() result, since uuid is not
# included in to_xml() result.
dom = self._lookup_by_name(instance["name"])
self._conn.defineXML(dom.XMLDesc(0))

Tags: libvirt
Matt Riedemann (mriedem)
tags: added: libvirt
Revision history for this message
wangpan (hzwangpan) wrote :
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → wangpan (hzwangpan)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit f05a0c486d8478cdea3808108b172b2487b38bf4
Author: Wangpan <email address hidden>
Date: Fri Jan 17 17:41:06 2014 +0800

    libvirt: use to_xml() in post_live_migration_at_destination

    Currently post_live_migration_at_destination use the dumpped
    xml to define a live-migrated instance, and write the libvirt.xml
    with to_xml(), we should keep consistency of these two places.

    Closes-bug: #1231215

    Change-Id: Id98ee3f21fb7a908a318d0f9abec0b740ff9e410

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