Bug 1607704 - [Engine] Cannot modify vNic profile of running vm with MTU set in its XML
Summary: [Engine] Cannot modify vNic profile of running vm with MTU set in its XML
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.2.5.1
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-4.2.6
: 4.2.6.2
Assignee: Alona Kaplan
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On: 1600140
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-24 05:25 UTC by Michael Burman
Modified: 2018-09-03 15:07 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.2.6.2
Clone Of:
Environment:
Last Closed: 2018-09-03 15:07:46 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+
ylavi: blocker-
mburman: testing_plan_complete+
mburman: testing_ack+


Attachments (Terms of Use)
logs (2.00 MB, application/x-gzip)
2018-07-24 05:27 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 93419 0 None MERGED engine: Support LibvirtVmXml for UpdateVnic 2020-09-07 08:15:15 UTC
oVirt gerrit 93491 0 ovirt-engine-4.2 MERGED engine: Support LibvirtVmXml for UpdateVnic 2020-09-07 08:15:15 UTC

Description Michael Burman 2018-07-24 05:25:45 UTC
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

Comment 1 Michael Burman 2018-07-24 05:27:46 UTC
Created attachment 1470165 [details]
logs

Comment 2 Dan Kenigsberg 2018-07-24 07:08:47 UTC
Let this track the Engine-side of bug 1600140

Comment 3 Red Hat Bugzilla Rules Engine 2018-07-24 07:08:54 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 4 Dan Kenigsberg 2018-07-24 10:10:25 UTC
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.

Comment 5 Dan Kenigsberg 2018-08-14 21:45:40 UTC
testable also with ovirt-engine-0:4.2.6.3_SNAPSHOT and vdsm-0:4.20.22-50.git360bd71.el7ev.src

Comment 6 Michael Burman 2018-08-15 11:55:48 UTC
Verified on - vdsm-4.20.37-1.el7ev.x86_64 and 4.2.6.3_SNAPSHOT-94.gbbcd5cb.0.scratch.master.el7ev

Comment 7 Vladimir Rulev 2018-08-16 11:58:59 UTC
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)


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