← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1550795] Re: live migration with block migration on Xen produces "cannot marshal" exception

 

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

commit 387329a959b4980d74541a5ddf6b54deab9fe957
Author: Corey Wright <corey.wright@xxxxxxxxxxxxx>
Date:   Fri Feb 26 00:24:48 2016 -0600

    Do not pass call_xenapi unmarshallable type
    
    Convert xmlrpc-unmarshallable CoercedDict from DictOfStringsField
    object field to marshallable built-in dict.
    
    Upstream commit f710f709 changed migrate_send_data to a
    DictOfStringsField in the XenapiLiveMigrateData object, which produces
    a CoercedDict, and upstream commit 69e01758 changed the handling of
    migrate_send_data in the xenapi virt driver, but didn't guard against
    migrate_send_data from being passed to xmlrpc, by way of XenAPI, as
    the unmarshallable CoercedDict, so convert to a standard dict.
    
    Technically, migrate_send_data is a nullable object field and can
    produce None, but that's invalid at this point in the code as the
    XenAPI commands VM.assert_can_migrate and VM.migrate_send require it,
    so throw an InvalidParameterValue exception and correct the unit tests
    with incorrect test data (ie block_migration=True, but
    migrate_send_data=None) that are accidentally triggering this
    exception.
    
    Change-Id: Ia28f9af8087dd45e9159264c3510637f6cf24be1
    Closes-Bug: #1550795


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1550795

Title:
  live migration with block migration on Xen produces "cannot marshal"
  exception

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  1. Nova version

  commit ce5a2fb419f999bec0fb2c67413387c8b67a691a

  2. Deserialized traceback as captured in log as received by messaging

  Traceback (most recent call last):
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 143, in _dispatch_and_reply
      executor_callback))
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 189, in _dispatch
      executor_callback)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
      result = func(ctxt, **new_args)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/exception.py", line 110, in wrapped
      payload)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/exception.py", line 89, in wrapped
      return f(self, context, *args, **kw)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/compute/manager.py", line 413, in decorated_function
      return function(self, context, *args, **kwargs)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/compute/manager.py", line 391, in decorated_function
      kwargs['instance'], e, sys.exc_info())
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/compute/manager.py", line 379, in decorated_function
      return function(self, context, *args, **kwargs)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/compute/manager.py", line 5281, in check_can_live_migrate_source
      block_device_info)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/virt/xenapi/driver.py", line 530, in check_can_live_migrate_source
      dest_check_data)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 2419, in check_can_live_migrate_source
      "VM.assert_can_migrate", vm_ref, dest_check_data)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 2524, in _call_live_migrate_command
      vdi_map, vif_map, options)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/nova/virt/xenapi/client/session.py", line 210, in call_xenapi
      return session.xenapi_request(method, args)
    File "/opt/rackstack/rackstack.532.2/nova/lib/python2.7/site-packages/XenAPI.py", line 133, in xenapi_request
      result = _parse_result(getattr(self, methodname)(*full_params))
    File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
      return self.__send(self.__name, args)
    File "/usr/lib/python2.7/xmlrpclib.py", line 1572, in __request
      allow_none=self.__allow_none)
    File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps
      data = m.dumps(params)
    File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps
      dump(v, write)
    File "/usr/lib/python2.7/xmlrpclib.py", line 652, in __dump
      raise TypeError, "cannot marshal %s objects" % type(value)
  TypeError: cannot marshal <class 'oslo_versionedobjects.fields.CoercedDict'> objects

  3. Reproduction steps

  * nova boot bug-xmlrpc_marshall_exception
  * nova live-migration --block-migrate bug-xmlrpc_marshall_exception

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1550795/+subscriptions


References