Created attachment 1380310 [details] engine, vdsm and supervdsm logs Description of problem: Hotplug failed for VM vNIC on RHEL 7.5 from vdsm.log: 2018-01-12 08:57:56,553+0200 INFO (jsonrpc/5) [virt.vm] (vmId='72b85ef7-dbd0-4a07-9afe-a3b90e2317fb') Hotplug NIC xml: <?xml version='1.0' encoding='utf-8'?> <interface type="bridge"><model type="virtio" /><link state="up" /><source bridge="" /><address bus="0x00" domain="0x0000" function="0x0" slot="0x04" type="pci" /><mac addr ess="00:1a:4a:16:20:1e" /><bandwidth /></interface> (vm:2850) 2018-01-12 08:57:56,584+0200 ERROR (jsonrpc/5) [virt.vm] (vmId='72b85ef7-dbd0-4a07-9afe-a3b90e2317fb') Hotplug failed (vm:2856) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2854, in hotplugNic self._dom.attachDevice(nicXml) File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 98, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 570, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: Cannot get interface MTU on '': No such device from engine.log: 2018-01-12 08:57:55,955+02 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugNicVDSCommand] (default task-13) [783110b4] NIC hot-set: <?xml version="1.0" encoding="UT F-8"?><hotplug> <devices> <interface type="bridge"> <model type="virtio"/> <link state="up"/> <source bridge=""/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x04" type="pci"/> <mac address="00:1a:4a:16:20:1e"/> <bandwidth/> </interface> </devices> <metadata xmlns:ovirt-vm="http://ovirt.org/vm/1.0"> <ovirt-vm:vm/> </metadata> </hotplug> Version-Release number of selected component (if applicable): vdsm-4.20.11-1.el7ev.x86_64 ovirt-engine-4.2.1-0.2.el7.noarch libvirt-3.9.0-6.el7.x86_64 Red Hat Enterprise Linux Server 7.5 Beta (Maipo) Steps to Reproduce: 1. Start VM with vNIC 2. Hotunplug the VM vNIC 3. Hotplug the VM vNIC Additional info:
I assume it works on a RHEL 7.4 based host? So it's somewhat of a 7.5 issue?
Arik, Engine sends <source bridge=""> in XML and 'network': u'' in legacy conf. Isn't it an Engine bug?
No, the engine is supposed to send it that way when there is no network configured for the NIC. @Milan, on run-VM VDSM replaces empty networks with ';vdsmdummy;' (I think it is done at [1]). Seems that this logic is not applied on hot-plug NIC with engine-XML, can you please check why? [1] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/virt/vm.py#L3050
comment 1
Dan, we have hotplug NIC in o-s-t - perhaps we need to check more to verify it indeed works?
(In reply to Yaniv Kaul from comment #5) > Dan, we have hotplug NIC in o-s-t - perhaps we need to check more to verify > it indeed works? http://jenkins.ovirt.org/job/ovirt-system-tests_manual/2014/artifact/exported-artifacts/test_logs/basic-suite-master/post-004_basic_sanity.py/lago-basic-suite-master-host-1/_var_log/vdsm/vdsm.log has a proper 2018-01-14 12:22:55,366-0500 INFO (jsonrpc/4) [api.virt] START hotplugNic(params={u'xml': u'<?xml version="1.0" encoding="UTF-8"?><hotplug><devices><interface type="bridge"><model type="virtio"></model><link state="up"></link><source bridge="onec35a86a12b94"></source><mac address="00:1a:4a:16:01:01"></mac><filterref filter="vdsm-no-mac-spoofing"></filterref><bandwidth></bandwidth></interface></devices><metadata xmlns:ovirt-vm="http://ovirt.org/vm/1.0"><ovirt-vm:vm><ovirt-vm:device mac_address="00:1a:4a:16:01:01"><ovirt-vm:custom></ovirt-vm:custom></ovirt-vm:device></ovirt-vm:vm></metadata></hotplug>', u'nic': {u'nicModel': u'pv', u'macAddr': u'00:1a:4a:16:01:01', u'linkActive': u'true', u'network': u'onec35a86a12b94', u'filterParameters': [], u'filter': u'vdsm-no-mac-spoofing', u'specParams': {u'inbound': {}, u'outbound': {}}, u'deviceId': u'31d699a2-ce49-4332-8f63-cbc23550b174', u'device': u'bridge', u'type': u'interface'}, u'vmId': u'a7be4667-0457-429b-b260-3476d03efd46'}) from=::ffff:192.168.201.4,38050, flow_id=94a0cd1 (api:46) but in this bug, according to Arik's analysis, we fail to hot-plug an unwired vnic. That action is not covered by OST.
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Verified on - vdsm-4.20.14-1.el7ev.x86_64 and 4.2.1.2-0.1.el7
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.