Xen live-migrate with volume attached ends with FIELD_TYPE_ERROR failure

Bug #1317208 reported by Andrew Laski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Garbutt

Bug Description

The relevant portion of an example stack trace is below:

2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packa
ges/nova/virt/xenapi/vmops.py", line 2316, in attach_block_device_volumes
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher volume_utils.forget_sr(self._session, sr_uuid_map[sr_re
f])
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/virt/xenapi/vmops.py", line 2307, in attach_block_device_volumes
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher hotplug=False)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/virt/xenapi/volumeops.py", line 53, in attach_volume
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher vm_ref = vm_utils.vm_ref_or_raise(self._session, instance_name)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/virt/xenapi/vm_utils.py", line 2661, in vm_ref_or_raise
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher vm_ref = lookup(session, instance_name)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/virt/xenapi/vm_utils.py", line 1743, in lookup
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher vm_refs = session.call_xenapi("VM.get_by_name_label", name_label)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/nova/virt/xenapi/client/session.py", line 179, in call_xenapi
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher return session.xenapi_request(method, args)
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/XenAPI.py", line 133, in xenapi_request
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher result = _parse_result(getattr(self, methodname)(*full_params))
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher File "/opt/rackstack/615.44/nova/lib/python2.6/site-packages/XenAPI.py", line 203, in _parse_result
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher raise Failure(result['ErrorDescription'])
2014-05-01 10:25:37.027 13905 TRACE oslo.messaging.rpc.dispatcher Failure: ['FIELD_TYPE_ERROR', 'label']

attach_block_device_volumes() in nova/virt/xenapi/vmops.py calls attach_volume() in nova/virt/xenapi/volumops.py and passes None for instance_name, and this causes a failure when looking up the vm_ref.

Tags: xenserver
Changed in nova:
assignee: nobody → John Garbutt (johngarbutt)
tags: added: xenserver
Changed in nova:
importance: Undecided → Medium
status: New → In Progress
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/92656

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 1e2b7fbf73a9d6b9088396cd41091911d35279ef
Author: John Garbutt <email address hidden>
Date: Wed May 7 19:32:14 2014 +0100

    xenapi: fix live-migrate with volume attached

    We need to attach the volume SR on the destination host during
    pre-live-migrate, so XenAPI spots the volume is present, and does't try
    to block migrate the volume to the destination host, instead it just
    connects to the remote volume before resuming the VM on the destination
    host.

    The fix is done by calling connect_volume instead of attach_volume. The
    None passed into instance was causing the lookup of the vm_ref to
    (correctly) fail, with:
    Failure: ['FIELD_TYPE_ERROR', 'label']

    Change-Id: I7eaf90582508b42a202da79072c891c216d137d1
    Closes-Bug: #1317208

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