Bug 842771

Summary: 3.1 beta1 - [vdsm] TypeError: cannot marshal None unless allow_none is enabled after restore from suspend (unable to migrate vm)
Product: Red Hat Enterprise Linux 6 Reporter: Haim <hateya>
Component: vdsmAssignee: Gal Hammer <ghammer>
Status: CLOSED ERRATA QA Contact: GenadiC <gcheresh>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: abaron, aburden, bazulay, cpelland, danken, iheim, ilvovsky, lpeer, mavital, mpavlik, yeylon, ykaul, zdover
Target Milestone: beta   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt, infra, network
Fixed In Version: vdsm-4.9.6-28.0 Doc Type: Bug Fix
Doc Text:
Previously, the virtual machine's "mirror" and "mirrorPath" properties had a value of "None" rather than an empty string. This caused problems when restoring virtual machines from suspended states. The "mirror" and "mirrorPath" properties are now correctly set to empty strings, and this issue no longer causes the failure of virtual machines to restore from suspended states.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:03:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 581266, 833637, 835390, 835392    
Attachments:
Description Flags
vdsm logs none

Description Haim 2012-07-24 14:52:53 UTC
Description of problem:

I have the following case after restoring vm from suspend state where vdsClient list table or migration attempts failing with following trackback:

Dummy-50::DEBUG::2012-07-24 20:45:37,066::__init__::1164::Storage.Misc.excCmd::(_log) SUCCESS: <err> = '1+0 records in\n1+0 records out\n1024000 bytes (1.0 MB) copied, 0.0478024 s, 21.4 MB/s\n'; <rc> = 0
Thread-146::DEBUG::2012-07-24 20:45:38,907::BindingXMLRPC::864::vds::(wrapper) client [10.35.97.14]::call vmMigrate with ({'src': 'nott-vds1.qa.lab.tlv.redhat.com', 'dst': 'nott-vds2.qa.lab.tlv.redhat.com:54321', 'vmId': 'cfea0a0b-57f4-486e-85a2-7db2cacefc7d', 'method': 'online'},)
 {} flowID [2adcd02f]
Thread-146::DEBUG::2012-07-24 20:45:38,908::API::421::vds::(migrate) {'src': 'nott-vds1.qa.lab.tlv.redhat.com', 'dst': 'nott-vds2.qa.lab.tlv.redhat.com:54321', 'vmId': 'cfea0a0b-57f4-486e-85a2-7db2cacefc7d', 'method': 'online'}
Thread-147::DEBUG::2012-07-24 20:45:38,910::vm::122::vm.Vm::(_setupVdsConnection) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::Destination server is: nott-vds2.qa.lab.tlv.redhat.com:54321
Thread-146::DEBUG::2012-07-24 20:45:38,910::BindingXMLRPC::870::vds::(wrapper) return vmMigrate with {'status': {'message': 'Migration process starting', 'code': 0}}
Thread-147::DEBUG::2012-07-24 20:45:38,911::vm::124::vm.Vm::(_setupVdsConnection) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::Initiating connection with destination
Thread-147::DEBUG::2012-07-24 20:45:38,979::libvirtvm::240::vm.Vm::(_getDiskStats) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::Disk hdc stats not available
Dummy-50::DEBUG::2012-07-24 20:45:39,079::__init__::1164::Storage.Misc.excCmd::(_log) 'dd if=/rhev/data-center/4c4eef8f-5a80-4ca0-ba5a-0f810c89393d/mastersd/dom_md/inbox iflag=direct,fullblock count=1 bs=1024000' (cwd None)
Thread-147::DEBUG::2012-07-24 20:45:39,105::vm::170::vm.Vm::(_prepareGuest) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::migration Process begins
Dummy-50::DEBUG::2012-07-24 20:45:39,188::__init__::1164::Storage.Misc.excCmd::(_log) SUCCESS: <err> = '1+0 records in\n1+0 records out\n1024000 bytes (1.0 MB) copied, 0.0585652 s, 17.5 MB/s\n'; <rc> = 0
Thread-147::DEBUG::2012-07-24 20:45:39,262::vm::217::vm.Vm::(run) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::migration semaphore acquired
Thread-147::ERROR::2012-07-24 20:45:39,468::vm::176::vm.Vm::(_recover) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::cannot marshal None unless allow_none is enabled
Thread-147::ERROR::2012-07-24 20:45:39,658::vm::240::vm.Vm::(run) vmId=`cfea0a0b-57f4-486e-85a2-7db2cacefc7d`::Failed to migrate
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 223, in run
    self._startUnderlyingMigration()
  File "/usr/share/vdsm/libvirtvm.py", line 417, in _startUnderlyingMigration
    response = self.destServer.migrationCreate(self._machineParams)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1483, in __request
    allow_none=self.__allow_none)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 780, in dump_struct
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 759, in dump_array
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 780, in dump_struct
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

repro:

- run vm
- create live snapshot
- clone vm from snapshot 
  * suspend vm 
- once suspended, restore

Comment 1 Haim 2012-07-24 14:54:33 UTC
[root@nott-vds1 ~]# vdsClient -s 0 list 
Traceback (most recent call last):
  File "/usr/share/vdsm/vdsClient.py", line 2113, in <module>
    code, message = commands[command][0](commandArgs)
  File "/usr/share/vdsm/vdsClient.py", line 265, in do_list
    response = self.s.list(True, vms)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
Fault: <Fault 1: "<type 'exceptions.TypeError'>:cannot marshal None unless allow_none is enabled">

Comment 2 Haim 2012-07-24 14:55:17 UTC
Created attachment 600047 [details]
vdsm logs

Comment 3 Haim 2012-07-26 08:03:49 UTC
(In reply to comment #2)
> Created attachment 600047 [details]
> vdsm logs

100% reproduction.

Comment 4 Gal Hammer 2012-08-05 14:03:17 UTC
A proposed fix: http://gerrit.ovirt.org/6909

Comment 5 Dan Kenigsberg 2012-08-13 08:13:37 UTC
*** Bug 827012 has been marked as a duplicate of this bug. ***

Comment 6 Dan Kenigsberg 2012-08-13 08:15:01 UTC
copying severity and target release from closed duplicate

Comment 8 GenadiC 2012-08-15 09:08:10 UTC
Verified in SI13.2
Suspend and restore worked on Non_mirroring VM

Comment 11 errata-xmlrpc 2012-12-04 19:03:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1508.html