Description of problem: Can't link down a VM's vNIC Most probably this is a virt bug, but i'm starting with network. Feel free to move it to the right team. New regression introduced in automation tests, can't link down a vNIC with: 'Error while executing action Edit VM Interface properties: General Exception' '2018-07-24 08:23:24,433+03 ERROR [org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand] (default task-4) [16792cff-4777-4398-8678-1f3f98a518df] Command 'org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to UpdateVmInterfaceVDS, error = General Exception: ('Operation not supported: cannot modify MTU',), code = 100 (Failed with error GeneralException and code 100)' 2018-07-24 08:23:24,410+0300 WARN (jsonrpc/4) [virt.vm] (vmId='8a3b6f66-c1d4-4658-921b-6f6cfb2dd624') Request failed: <?xml version='1.0' encoding='utf-8'?> <interface type="bridge"> <address bus="0x00" domain="0x0000" function="0x0" slot="0x03" type="pci" /> <mac address="00:00:00:00:00:53" /> <model type="virtio" /> <source bridge="ovirtmgmt" /> <filterref filter="vdsm-no-mac-spoofing" /> <link state="down" /> <boot order="2" /> <alias name="ua-a0250631-f250-429a-a7a2-e131d2e9f8c9" /> <bandwidth /> </interface> (vm:3239) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 3234, in setLinkAndNetwork libvirt.VIR_DOMAIN_AFFECT_LIVE) 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 2739, in updateDeviceFlags if ret == -1: raise libvirtError ('virDomainUpdateDeviceFlags() failed', dom=self) libvirtError: Operation not supported: cannot modify MTU 2018-07-24 08:23:24,410+0300 WARN (jsonrpc/4) [virt.vm] (vmId='8a3b6f66-c1d4-4658-921b-6f6cfb2dd624') Rolling back link and net for: ua-a0250631-f250-429a-a7a2-e131d2e9f8 c9 (vm:3248) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 3243, in setLinkAndNetwork raise SetLinkAndNetworkError(str(e)) SetLinkAndNetworkError: Operation not supported: cannot modify MTU 2018-07-24 08:23:24,416+0300 ERROR (jsonrpc/4) [api] FINISH updateDevice error=Operation not supported: cannot modify MTU (api:132) Version-Release number of selected component (if applicable): 4.2.5.2_SNAPSHOT-83.g4210c43.0.scratch.master.el7ev vdsm-4.20.35-1.el7ev.x86_64 How reproducible: 100% Steps to Reproduce: 1. Start VM with a vNIC 2. Try to link down the vNIC Actual results: Fialed Expected results: Should work
Created attachment 1470165 [details] logs
Let this track the Engine-side of bug 1600140
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.
After discussion with Arik and Francesco, we would like Engine to call updateDevice with an optional xml parameter, with the desired xml of the updated device. New Vdsm would prefer the xml param, if provided, over the vm.conf based params.
testable also with ovirt-engine-0:4.2.6.3_SNAPSHOT and vdsm-0:4.20.22-50.git360bd71.el7ev.src
Verified on - vdsm-4.20.37-1.el7ev.x86_64 and 4.2.6.3_SNAPSHOT-94.gbbcd5cb.0.scratch.master.el7ev
Hi! As a temporary workaround it is possible to use hook in before_update_device: #!/usr/bin/python import hooking xml = hooking.read_domxml() if xml.documentElement.localName == "interface": e = xml.createElement('mtu') e.setAttribute('size', '1500') xml.documentElement.appendChild(e) hooking.write_domxml(xml)