Bug 1147458

Summary: JSONRPC | hotplug/hotunplug NIC to VM fail
Product: Red Hat Enterprise Virtualization Manager Reporter: Meni Yakove <myakove>
Component: vdsmAssignee: Barak <bazulay>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: bazulay, danken, ecohen, gklein, iheim, lpeer, lsurette, lvernia, mpavlik, omachace, oourfali, scohen, yeylon
Target Milestone: ---Keywords: AutomationBlocker, Regression, TestBlocker
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: v4.16.6 Doc Type: Bug Fix
Doc Text:
Cause: There was a typo in the JSONRPC mapping for vNIC plugging. Consequence: The call to hotunplug would fail. Fix: Use the proper internal api call. Result: Normal operation when under JSONRPC.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 13:39:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1147536, 1164308, 1164311    
Attachments:
Description Flags
engine and vdsm logs none

Description Meni Yakove 2014-09-29 09:42:30 UTC
Created attachment 942245 [details]
engine and vdsm logs

Description of problem:
hotplug/hotunplug NIC to VM fail with error:

Thread-9547::DEBUG::2014-09-28 13:56:17,249::vm::3684::vm.Vm::(hotunplugNic) vmId=`55b9e89a-d5b8-4984-8ab7-72009aba9edb`::Hotunplug NIC xml: <interface type="bridge">
        <address bus="0x00" domain="0x0000" function="0x0" slot="0x09" type="pci"/>
        <mac address="00:1a:4a:16:88:52"/>
        <model type="virtio"/>
        <source bridge="sw163"/>
        <filterref filter="vdsm-no-mac-spoofing"/>
        <link state="up"/>
        <bandwidth/>
</interface>

GuestMonitor-Global_vm_1::DEBUG::2014-09-28 13:56:17,293::vm::486::vm.Vm::(_getUserCpuTuneInfo) vmId=`8e64da17-1d6b-460f-bd35-5710eb0160a2`::Domain Metadata is not set
GuestMonitor-Global_vm_1::DEBUG::2014-09-28 13:56:17,294::vm::486::vm.Vm::(_getUserCpuTuneInfo) vmId=`8e64da17-1d6b-460f-bd35-5710eb0160a2`::Domain Metadata is not set
GuestMonitor-Global_vm_1::DEBUG::2014-09-28 13:56:17,295::vm::486::vm.Vm::(_getUserCpuTuneInfo) vmId=`8e64da17-1d6b-460f-bd35-5710eb0160a2`::Domain Metadata is not set
Thread-9547::ERROR::2014-09-28 13:56:17,530::__init__::491::jsonrpc.JsonRpcServer::(_serveRequest) Internal server error
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py", line 486, in _serveRequest
    res = method(**params)
  File "/usr/share/vdsm/rpc/Bridge.py", line 286, in _dynamicMethod
    ret = retfield(result)
  File "/usr/share/vdsm/rpc/Bridge.py", line 236, in _fixupRet
    continue
  File "/usr/share/vdsm/rpc/Bridge.py", line 216, in _typeFixup
    logging.warn("Fixing up type %s", symTypeName)
TypeError: argument of type 'NoneType' is not iterable 

Version-Release number of selected component (if applicable):
vdsm-4.16.5-2.el6ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. hotplug/hotunplug NIC to/from VM


Actual results:
hotplug/hotunplug NIC fail


Additional info:
When running with XML-RPC I don't have this issue

Comment 2 Piotr Kliczewski 2014-09-29 12:54:13 UTC
It looks like ret value of hotunplugNic us None.

Comment 3 Oved Ourfali 2014-09-30 05:42:18 UTC
Antoni - does that require an additional fix, or can we move that to POST?
Thanks

Comment 4 Oved Ourfali 2014-09-30 05:56:12 UTC
*** Bug 1147505 has been marked as a duplicate of this bug. ***

Comment 5 Dan Kenigsberg 2014-09-30 08:15:12 UTC
Piotr's patch only converts the TypeError to a hand-crafted exception. It does not solve the underlying problem (how come does hotunplug return None for vmList), which is still being researched.

Comment 6 Martin Pavlik 2014-10-07 14:55:30 UTC
works in vt5 (vdsm-4.16.6-1.el6ev.x86_64)

hot plug/unplug with JSON enabled is fine