Bug 1533762 - Failed to hotplug a vNIC with Empty network
Summary: Failed to hotplug a vNIC with Empty network
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.20.11
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.2.1
: ---
Assignee: Milan Zamazal
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-12 07:08 UTC by Meni Yakove
Modified: 2018-02-12 11:52 UTC (History)
6 users (show)

Fixed In Version: vdsm v4.20.14
Doc Type: Bug Fix
Doc Text:
Hot plug of a NIC with empty network was failing. It has been fixed and the hot plug works now.
Clone Of:
Environment:
Last Closed: 2018-02-12 11:52:05 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine, vdsm and supervdsm logs (1.43 MB, application/zip)
2018-01-12 07:08 UTC, Meni Yakove
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86344 0 master MERGED virt: Replace NIC XML on XML network hot plug 2020-09-07 10:16:45 UTC

Description Meni Yakove 2018-01-12 07:08:52 UTC
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:

Comment 1 Yaniv Kaul 2018-01-14 08:15:04 UTC
I assume it works on a RHEL 7.4 based host? So it's somewhat of a 7.5 issue?

Comment 2 Dan Kenigsberg 2018-01-14 13:05:52 UTC
Arik, Engine sends <source bridge=""> in XML and  'network': u'' in legacy conf. Isn't it an Engine bug?

Comment 3 Arik 2018-01-14 15:21:15 UTC
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 4 Arik 2018-01-14 15:21:49 UTC
comment 1

Comment 5 Yaniv Kaul 2018-01-14 15:32:49 UTC
Dan, we have hotplug NIC in o-s-t - perhaps we need to check more to verify it indeed works?

Comment 6 Dan Kenigsberg 2018-01-14 21:04:01 UTC
(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.

Comment 7 Red Hat Bugzilla Rules Engine 2018-01-16 11:27:19 UTC
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.

Comment 8 Michael Burman 2018-01-22 12:08:07 UTC
Verified on - vdsm-4.20.14-1.el7ev.x86_64 and 4.2.1.2-0.1.el7

Comment 9 Sandro Bonazzola 2018-02-12 11:52:05 UTC
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.


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