Bug 1147505 - TypeError, when deactivation vm nic via engine
Summary: TypeError, when deactivation vm nic via engine
Keywords:
Status: CLOSED DUPLICATE of bug 1147458
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm-jsonrpc-java
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Piotr Kliczewski
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-29 12:36 UTC by Ondra Machacek
Modified: 2016-02-10 19:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-30 05:56:12 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ondra Machacek 2014-09-29 12:36:42 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Deativate vm via engine.
POST /api/vms/7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b/nics/6ce03059-0a48-4986-b17b-7fe1cd10dcd4/deactivate 
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
</action>

Actual results:
Status: 400
	Reason: Bad Request
	Detail: [Unexpected exception]


Expected results:
deactivation successfull

Additional info:

Thread-305::DEBUG::2014-09-26 21:28:28,941::__init__::467::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.hotunplugNic' in bridge with {u'params': {u'nic': {u'nicModel': u'pv', u'macAddr': u'00:1a:4a:16:81:f4', u'linkActive': u'true', u'network': u'rhevm', u'custom': {u'bandwidth': u'10000', u'speed': u'1000', u'port_mirroring': u'True'}, u'filter': u'vdsm-no-mac-spoofing', u'specParams': {u'inbound': {}, u'outbound': {}}, u'deviceId': u'6ce03059-0a48-4986-b17b-7fe1cd10dcd4', u'address': {u'slot': u'0x0a', u'bus': u'0x00', u'domain': u'0x0000', u'type': u'pci', u'function': u'0x0'}, u'device': u'bridge', u'type': u'interface'}, u'vmId': u'7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b'}, u'vmID': u'7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b'}
JsonRpcServer::DEBUG::2014-09-26 21:28:28,941::__init__::504::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request
Thread-305::DEBUG::2014-09-26 21:28:28,945::utils::738::root::(execCmd) /usr/libexec/vdsm/hooks/before_nic_hotunplug/before_nic_hotunplug.sh (cwd None)
Thread-305::DEBUG::2014-09-26 21:28:28,962::utils::758::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
Thread-305::INFO::2014-09-26 21:28:28,963::hooks::100::root::(_runHooksDir) 
Thread-305::DEBUG::2014-09-26 21:28:28,963::vm::3684::vm.Vm::(hotunplugNic) vmId=`7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b`::Hotunplug NIC xml: <interface type="bridge">
	<address bus="0x00" domain="0x0000" function="0x0" slot="0x0a" type="pci"/>
	<mac address="00:1a:4a:16:81:f4"/>
	<model type="virtio"/>
	<source bridge="rhevm"/>
	<filterref filter="vdsm-no-mac-spoofing"/>
	<link state="up"/>
	<bandwidth/>
</interface>

Thread-305::DEBUG::2014-09-26 21:28:29,251::utils::738::root::(execCmd) /usr/libexec/vdsm/hooks/after_nic_hotunplug/after_nic_hotunplug.py (cwd None)
Thread-17::DEBUG::2014-09-26 21:28:29,259::__init__::232::IOProcess::(_processLogs) Receiving request...
Thread-17::DEBUG::2014-09-26 21:28:29,260::__init__::232::IOProcess::(_processLogs) Queuing request in the thread pool...
Thread-17::DEBUG::2014-09-26 21:28:29,260::__init__::232::IOProcess::(_processLogs) Extracting request information...
Thread-17::DEBUG::2014-09-26 21:28:29,260::__init__::232::IOProcess::(_processLogs) (645) Got request for method 'statvfs'
Thread-17::DEBUG::2014-09-26 21:28:29,262::__init__::232::IOProcess::(_processLogs) (645) Queuing response
Thread-20::DEBUG::2014-09-26 21:28:29,263::fileSD::261::Storage.Misc.excCmd::(getReadDelay) /bin/dd if=/rhev/data-center/mnt/10.35.160.108:_RHEV_jenkins-vm-35__nfs__2014__09__26__21__2__24__263439/021cd291-1bc7-41ef-a3b0-7994c03a7aa0/dom_md/metadata iflag=direct of=/dev/null bs=4096 count=1 (cwd None)
Thread-305::DEBUG::2014-09-26 21:28:29,270::utils::758::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
Thread-305::INFO::2014-09-26 21:28:29,271::hooks::100::root::(_runHooksDir) 
Thread-20::DEBUG::2014-09-26 21:28:29,272::fileSD::261::Storage.Misc.excCmd::(getReadDelay) SUCCESS: <err> = '0+1 records in\n0+1 records out\n499 bytes (499 B) copied, 0.000243892 s, 2.0 MB/s\n'; <rc> = 0
Thread-17::DEBUG::2014-09-26 21:28:29,275::__init__::232::IOProcess::(_processLogs) Receiving request...
Thread-17::DEBUG::2014-09-26 21:28:29,275::__init__::232::IOProcess::(_processLogs) Queuing request in the thread pool...
Thread-17::DEBUG::2014-09-26 21:28:29,275::__init__::232::IOProcess::(_processLogs) Extracting request information...
Thread-17::DEBUG::2014-09-26 21:28:29,275::__init__::232::IOProcess::(_processLogs) (646) Got request for method 'statvfs'
Thread-17::DEBUG::2014-09-26 21:28:29,275::__init__::232::IOProcess::(_processLogs) (646) Queuing response
Thread-17::DEBUG::2014-09-26 21:28:29,276::__init__::232::IOProcess::(_processLogs) Receiving request...
Thread-17::DEBUG::2014-09-26 21:28:29,277::__init__::232::IOProcess::(_processLogs) Queuing request in the thread pool...
Thread-17::DEBUG::2014-09-26 21:28:29,277::__init__::232::IOProcess::(_processLogs) Extracting request information...
Thread-17::DEBUG::2014-09-26 21:28:29,277::__init__::232::IOProcess::(_processLogs) (647) Got request for method 'access'
Thread-17::DEBUG::2014-09-26 21:28:29,277::__init__::232::IOProcess::(_processLogs) (647) Queuing response
Thread-17::DEBUG::2014-09-26 21:28:29,278::__init__::232::IOProcess::(_processLogs) Receiving request...
Thread-17::DEBUG::2014-09-26 21:28:29,278::__init__::232::IOProcess::(_processLogs) Queuing request in the thread pool...
Thread-17::DEBUG::2014-09-26 21:28:29,278::__init__::232::IOProcess::(_processLogs) Extracting request information...
Thread-17::DEBUG::2014-09-26 21:28:29,278::__init__::232::IOProcess::(_processLogs) (648) Got request for method 'access'
Thread-17::DEBUG::2014-09-26 21:28:29,279::__init__::232::IOProcess::(_processLogs) (648) Queuing response
Thread-17::DEBUG::2014-09-26 21:28:29,279::__init__::232::IOProcess::(_processLogs) Receiving request...
Thread-17::DEBUG::2014-09-26 21:28:29,279::__init__::232::IOProcess::(_processLogs) Queuing request in the thread pool...
Thread-17::DEBUG::2014-09-26 21:28:29,280::__init__::232::IOProcess::(_processLogs) Extracting request information...
Thread-17::DEBUG::2014-09-26 21:28:29,280::__init__::232::IOProcess::(_processLogs) (649) Got request for method 'access'
Thread-17::DEBUG::2014-09-26 21:28:29,280::__init__::232::IOProcess::(_processLogs) (649) Queuing response
Thread-305::ERROR::2014-09-26 21:28:29,273::__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
    return self._fixupRet(className, methodName, ret)
  File "/usr/share/vdsm/rpc/Bridge.py", line 236, in _fixupRet
    self._typeFixup('return', retType, result)
  File "/usr/share/vdsm/rpc/Bridge.py", line 216, in _typeFixup
    if k in item:
TypeError: argument of type 'NoneType' is not iterable
Thread-305::DEBUG::2014-09-26 21:28:29,293::stompReactor::163::yajsonrpc.StompServer::(send) Sending response
JsonRpc (StompReactor)::DEBUG::2014-09-26 21:28:29,726::stompReactor::98::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command='SEND'>

Comment 1 Ondra Machacek 2014-09-29 12:37:14 UTC
engine.log

 2014-09-26 21:28:29,325 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HotUnplugNicVDSCommand] (ajp-/127.0.0.1:8702-4) [1bba762e] Command HotUnplugNicVDSCommand(HostName = 10.35.160.59, HostId = d30ff080-8f71-4d5f-838b-35aa574214a0, vm.vm_name=Global_vm_1, nic=hotunplug_nic {id=6ce03059-0a48-4986-b17b-7fe1cd10dcd4, vnicProfileId=669920c8-f83f-4193-b05f-d00ceacc59b2, speed=1000, type=3, macAddress=00:1a:4a:16:81:f4, linked=true, vmId=7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b, vmTemplateId=null}, vmDevice=VmDevice {vmId=7a0f9133-fb32-4645-8ceb-9bca6a6c4a9b, deviceId=6ce03059-0a48-4986-b17b-7fe1cd10dcd4, device=bridge, type=INTERFACE, bootOrder=0, specParams={outbound={}, inbound={}}, address={slot=0x0a, bus=0x00, domain=0x0000, type=pci, function=0x0}, managed=true, plugged=true, readOnly=false, deviceAlias=net2, customProperties={}, snapshotId=null}) execution failed. Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed to HotUnplugNicVDS, error = argument of type 'NoneType' is not iterable, code = -32603
21:28:31 2014-09-26 21:28:29,325 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.HotUnplugNicVDSCommand] (ajp-/127.0.0.1:8702-4) [1bba762e] FINISH, HotUnplugNicVDSCommand, log id: 6f739505
21:28:31 2014-09-26 21:28:29,325 ERROR [org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand] (ajp-/127.0.0.1:8702-4) [1bba762e] Command org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to HotUnplugNicVDS, error = argument of type 'NoneType' is not iterable, code = -32603 (Failed with error unexpected and code 16)
21:28:31 2014-09-26 21:28:29,336 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-4) [1bba762e] Correlation ID: 1bba762e, Call Stack: null, Custom Event ID: -1, Message: Failed to unplug Network Interface hotunplug_nic (VirtIO) from VM Global_vm_1. (User: admin)
21:28:31 2014-09-26 21:28:29,377 INFO  [org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand] (ajp-/127.0.0.1:8702-4) [1bba762e] Command [id=bedb25d1-be8b-4535-914b-cff96de5f368]: Compensating DELETED_OR_UPDATED_ENTITY of org.ovirt.engine.core.common.businessentities.network.VmNic; snapshot: id=6ce03059-0a48-4986-b17b-7fe1cd10dcd4.

Comment 2 Oved Ourfali 2014-09-30 05:56:12 UTC
Seems like a duplicate of Bug 1147458. If I'm wrong, please reopen.

*** This bug has been marked as a duplicate of bug 1147458 ***


Note You need to log in before you can comment on or make changes to this bug.