Bug 1339604 - Modify a VM network when it is used not working
Summary: Modify a VM network when it is used not working
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.0.0
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Edward Haas
QA Contact: Michael Burman
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-25 12:36 UTC by Michael Burman
Modified: 2016-07-05 07:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-07-05 07:41:07 UTC
oVirt Team: Network
rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)
Logs (1.32 MB, application/x-gzip)
2016-05-25 12:36 UTC, Michael Burman
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 58971 0 None MERGED net: Canonicalize and 'translate' ipv6autoconf 2020-11-16 16:24:14 UTC
oVirt gerrit 59030 0 ovirt-4.0 MERGED net: Canonicalize and 'translate' ipv6autoconf 2020-11-16 16:24:13 UTC

Description Michael Burman 2016-05-25 12:36:49 UTC
Created attachment 1161399 [details]

Description of problem:
Modify a VM network when it is used not working. 

This was fixed in this BZ 1055454 and verified, but not working on 4.0

It's not possible to modify a VM network when it is used by a VM. 
The next changes should work and invoke sync on host while the VM is running:
- vlan tag
- Host QoS
- Mtu

(1/1): Failed to apply changes for network(s) n-2 on host puma22.scl.lab.tlv.redhat.com. (User: admin@internal-authz)

VDSM puma22.scl.lab.tlv.redhat.com command failed: Bridge n-2 has interfaces set(['vnet0']) connected

jsonrpc.Executor/5::ERROR::2016-05-25 15:29:34,606::API::1462::vds::(setupNetworks) Bridge n-2 has interfaces set(['vnet0']) connected
Traceback (most recent call last):
  File "/usr/share/vdsm/API.py", line 1459, in setupNetworks
    supervdsm.getProxy().setupNetworks(networks, bondings, options)
  File "/usr/lib/python2.7/site-packages/vdsm/supervdsm.py", line 53, in __call__
    return callMethod()
  File "/usr/lib/python2.7/site-packages/vdsm/supervdsm.py", line 51, in <lambda>
  File "<string>", line 2, in setupNetworks
  File "/usr/lib64/python2.7/multiprocessing/managers.py", line 773, in _callmethod
    raise convert_to_error(kind, result)
ConfigNetworkError: (28, "Bridge n-2 has interfaces set(['vnet0']) connected")

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

How reproducible:

Steps to Reproduce:
1. Attach VM network to host via setup networks with some host QoS defind 
2. Run VM using this network 
3. Via Networks main tab, edit the network and try to change :
a - To other host QoS
b - To be vlan tagged network
c - Set custom MTU 9000

Actual results:
 Failed to apply changes for network(s) on host with error -
ConfigNetworkError: (28, "Bridge n-2 has interfaces set(['vnet0']) connected")

Expected results:
Should work as expected. It is fixed on 3.6 and verified. 
So it is a regression on vdsm side. 

Additional info:
See also

Comment 1 Michael Burman 2016-05-25 12:37:35 UTC
See also BZ 1055454

Comment 2 Michael Burman 2016-05-25 12:38:11 UTC
vdsm version - vdsm-4.18.0-43.git6f7fc83.el7.centos.x86_64

Comment 3 Michael Burman 2016-05-25 12:48:14 UTC
When trying to sync the network we are failing with - Error while executing action SyncAllHostNetworks: Network is currently being used.

2016-05-25 15:46:49,671 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (default task-12) [751bd27f] Failed in 'HostSetupNetworksVDS' method
2016-05-25 15:46:49,676 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-12) [751bd27f] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VDSM puma22.s
cl.lab.tlv.redhat.com command failed: Bridge n-2 has interfaces set(['vnet0']) connected
2016-05-25 15:46:49,676 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (default task-12) [751bd27f] Error: VDSGenericException: VDSErrorException: Failed to HostSetupNetworksVDS, err
or = Bridge n-2 has interfaces set(['vnet0']) connected, code = 28
2016-05-25 15:46:49,676 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (default task-12) [751bd27f] Exception: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGeneric
Exception: VDSErrorException: Failed to HostSetupNetworksVDS, error = Bridge n-2 has interfaces set(['vnet0']) connected, code = 28

Comment 4 Red Hat Bugzilla Rules Engine 2016-05-25 14:40:12 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 5 Dan Kenigsberg 2016-05-25 14:55:02 UTC
MainProcess|jsonrpc.Executor/7::INFO::2016-05-25 12:04:56,453::netconfpersistence::56::root::(setNetwork) Adding network n-2({'vlan': 164, 'nic': 'enp4s0f1', 'dhcpv6': False, 'mtu': 1500, 'switch': 'legacy', 'bootproto': 'none', 'stp': False, 'bridged': True, 'defaultRoute': False})
MainProcess|jsonrpc.Executor/7::INFO::2016-05-25 12:04:56,454::netconfpersistence::67::root::(setBonding) Adding bond0({'nics': [], 'switch': 'legacy', 'options': 'mode=0'})
MainProcess|jsonrpc.Executor/7::DEBUG::2016-05-25 12:04:56,454::legacy_switch::375::root::(remove_networks) Removing network 'n-2'
MainProcess|jsonrpc.Executor/7::DEBUG::2016-05-25 12:04:56,454::legacy_switch::450::root::(_should_keep_bridge) the bridge is being reconfigured
MainProcess|jsonrpc.Executor/7::INFO::2016-05-25 12:04:56,454::netconfpersistence::61::root::(removeNetwork) Removing network n-2
MainProcess|jsonrpc.Executor/7::INFO::2016-05-25 12:04:56,455::legacy_switch::308::root::(_del_network) Removing network n-2 with vlan=enp4s0f1.164, bonding=None, nics=['enp4s0f1'],keep_bridge=False options={}
MainProcess|jsonrpc.Executor/7::ERROR::2016-05-25 12:04:56,455::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error in setupNetworks
Traceback (most recent call last):
  File "/usr/share/vdsm/supervdsmServer", line 94, in wrapper
    res = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 228, in setupNetworks
    _setup_networks(networks, bondings, options)
  File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 255, in _setup_networks
    netswitch.setup(networks, bondings, options, in_rollback)
  File "/usr/lib/python2.7/site-packages/vdsm/network/netswitch.py", line 109, in setup
    _setup_legacy(legacy_nets, legacy_bonds, options, in_rollback)
  File "/usr/lib/python2.7/site-packages/vdsm/network/netswitch.py", line 124, in _setup_legacy
    _netinfo, _libvirt_nets)
  File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 384, in remove_networks
  File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 180, in wrapped
    return func(network, configurator, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 312, in _del_network
    bridged and not keep_bridge, _netinfo)
  File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 360, in _validateDelNetwork
    _assert_bridge_clean(network, vlan, bonding, nics)
  File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 292, in _assert_bridge_clean
    ' %s connected' % (bridge, brifs))
ConfigNetworkError: (28, "Bridge n-2 has interfaces set(['vnet0']) connected")

Comment 6 Edward Haas 2016-06-13 06:09:58 UTC
This seems to be the same issue seen in https://bugzilla.redhat.com/show_bug.cgi?id=1332076

Please verify this is indeed the case.

Comment 7 Michael Burman 2016-06-13 06:16:37 UTC
Hi Edi,

I don't know if it is the same case. You said it is, but i'm not sure.
You said once BZ 1332076 will be fixed this bug will be resolved, but i'm really not sure it is the same issue. I will be able to verify this only when it will be ON_QA. 


Comment 8 Michael Burman 2016-06-14 06:49:05 UTC
Edi, the fix is not in our latest qe build, moving back to MODIFIED.
Tested on and vdsm-4.18.2-0.el7ev.x86_64

Comment 9 Michael Burman 2016-06-23 09:12:47 UTC
Verified on - and vdsm-4.18.4-2.el7ev.x86_64

Note that modifying a Host QoS on a VM network while it is being used never was part of this RFE BZ 1055454(after reviewing the code with Edward and our test plan from 3.6)
It is only covering the change of vlan and MTU properties.

Comment 10 Sandro Bonazzola 2016-07-05 07:41:07 UTC
oVirt 4.0.0 has been released, closing current release.

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