Description of problem: A bonded network is created with one tagged network and untagged network with below configuration from the RHEV GUI. == cat /etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by VDSM version 4.17.31-0.el7ev DEVICE=bond0 BONDING_OPTS='mode=1 miimon=100' BRIDGE=untag ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no HOTPLUG=no cat /etc/sysconfig/network-scripts/ifcfg-bond0.10 # Generated by VDSM version 4.17.31-0.el7ev DEVICE=bond0.10 VLAN=yes BRIDGE=tagged ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no HOTPLUG=no == Then the vlan tag was change to 20 for "untag" network from the RHEV-M. However "BRIDGE=untag" stayed in the ifcfg-bond0 configuration file. == cat /etc/sysconfig/network-scripts/ifcfg-bond0.20 # Generated by VDSM version 4.17.31-0.el7ev DEVICE=bond0.20 VLAN=yes BRIDGE=untag ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no HOTPLUG=no cat /etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by VDSM version 4.17.31-0.el7ev DEVICE=bond0 BONDING_OPTS='mode=1 miimon=100' BRIDGE=untag =========> This is not deleted. ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no HOTPLUG=no ====== If we restart the vdsmd in this state, the service will fail with below error. === restore-net::INFO::2016-08-05 21:54:36,212::netconfpersistence::187::root::(_clearDisk) Clearing /var/run/vdsm/netconf/nets/ and /var/run/vdsm/netconf/bonds/ restore-net::ERROR::2016-08-05 21:54:36,212::vdsm-restore-net-config::444::root::(restore) unified restoration failed. Traceback (most recent call last): File "/usr/share/vdsm/vdsm-restore-net-config", line 439, in restore unified_restoration() File "/usr/share/vdsm/vdsm-restore-net-config", line 131, in unified_restoration changed_config = _filter_changed_nets_bonds(available_config) File "/usr/share/vdsm/vdsm-restore-net-config", line 258, in _filter_changed_nets_bonds kernel_config = KernelConfig(netinfo.NetInfo()) File "/usr/lib/python2.7/site-packages/vdsm/netconfpersistence.py", line 204, in __init__ for net, net_attr in self._analyze_netinfo_nets(netinfo): File "/usr/lib/python2.7/site-packages/vdsm/netconfpersistence.py", line 216, in _analyze_netinfo_nets yield net, self._translate_netinfo_net(net, net_attr) File "/usr/lib/python2.7/site-packages/vdsm/netconfpersistence.py", line 224, in _translate_netinfo_net self._netinfo.getNicsVlanAndBondingForNetwork(net) File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 993, in getNicsVlanAndBondingForNetwork assert bonding is None AssertionError === Also this can cause potential network loop. Version-Release number of selected component (if applicable): vdsm-4.17.31-0.el7ev.noarch rhevm-3.6.8.1-0.1.el6.noarch How reproducible: 100% Steps to Reproduce: 1. Create a bonded network and attach one vlan tagged network and untagged network to this bond. 2. Modify the untagged network and add a vlan tag. 3. "Bridge=" parameter is not deleted from the bond ifcfg configuration file which will create network loop and vdsmd will not start after this. Actual results: "Bridge=" parameter is not deleted from the bond ifcfg configuration file when changing a untagged network to tagged Expected results: "Bridge=" parameter should be deleted from the bond ifcfg configuration file when changing a untagged network to tagged Additional info:
Logs. Setting up network == 2016-09-02 16:01:53,911 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (ajp-/127.0.0.1:8702-5) [3e8e3570] START, HostSetupNetworksVDSCommand(HostName = hosted_engine_2, HostSetupNetworksVdsCommandParameters:{runAsync='true', hostId='6458a893-a514-4b5f-be6b-76f85afbcb0d', vds='Host[hosted_engine_2,6458a893-a514-4b5f-be6b-76f85afbcb0d]', rollbackOnFailure='true', conectivityTimeout='120', hostNetworkQosSupported='true', networks='[HostNetwork:{defaultRoute='false', bonding='true', networkName='tagged', nicName='bond0', vlan='10', mtu='0', vmNetwork='true', stp='false', properties='null', bootProtocol='NONE', address='null', netmask='null', gateway='null'}, HostNetwork:{defaultRoute='false', bonding='true', networkName='untag', nicName='bond0', vlan='null', mtu='0', vmNetwork='true', stp='false', properties='null', bootProtocol='NONE', address='null', netmask='null', gateway='null'}]', removedNetworks='[]', bonds='[]', removedBonds='[]'}), log id: eede3ac == Changing vlan=20 == 2016-09-02 16:08:03,411 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-5-thread-50) [56157671] Correlation ID: 56157671, Call Stack: null, Custom Event ID: -1, Message: (1/1): Applying network's changes on host hosted_engine_2. (User: admin@internal) 2016-09-02 16:08:07,409 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (org.ovirt.thread.pool-5-thread-50) [56157671] START, HostSetupNetworksVDSCommand(HostName = hosted_engine_2, HostSetupNetworksVdsCommandParameters:{runAsync='true', hostId='6458a893-a514-4b5f-be6b-76f85afbcb0d', vds='Host[hosted_engine_2,6458a893-a514-4b5f-be6b-76f85afbcb0d]', rollbackOnFailure='true', conectivityTimeout='120', hostNetworkQosSupported='true', networks='[HostNetwork:{defaultRoute='false', bonding='true', networkName='untag', nicName='bond0', vlan='20', mtu='0', vmNetwork='true', stp='false', properties='[]', bootProtocol='NONE', address='null', netmask='null', gateway='null'}]', removedNetworks='[]', bonds='[]', removedBonds='[]'}), log id: 3553bda7 2016-09-02 16:08:30,213 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.SetSafeNetworkConfigVDSCommand] (org.ovirt.thread.pool-5-thread-50) [56157671] START, SetSafeNetworkConfigVDSCommand(HostName = hosted_engine_2, VdsIdVDSCommandParametersBase:{runAsync='true', hostId='6458a893-a514-4b5f-be6b-76f85afbcb0d'}), log id: f4deb60 2016-09-02 16:08:31,137 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.SetSafeNetworkConfigVDSCommand] (org.ovirt.thread.pool-5-thread-50) [56157671] FINISH, SetSafeNetworkConfigVDSCommand, log id: f4deb60 2016-09-02 16:08:37,826 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-5-thread-50) [56157671] Correlation ID: 56157671, Call Stack: null, Custom Event ID: -1, Message: (1/1): Successfully applied changes for network(s) untag on host hosted_engine_2. (User: admin@internal) =====
Please include supervdsm.log as well.
Verified on - 4.0.5-0.1.el7ev and vdsm-4.18.15-1.el7ev.x86_64
This bug was verified, but further testing shows that bug isn't fixed properly, for example the single nic scenario and vlan(bond works) - root@camel-vdsa ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp6s0 # Generated by VDSM version 4.18.15-1.el7ev DEVICE=enp6s0 BRIDGE=mb ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no [root@camel-vdsa ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp6s0.111 # Generated by VDSM version 4.18.15-1.el7ev DEVICE=enp6s0.111 VLAN=yes BRIDGE=mb2 ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no [root@camel-vdsa ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp6s0.112 # Generated by VDSM version 4.18.15-1.el7ev DEVICE=enp6s0.112 VLAN=yes BRIDGE=mb ONBOOT=yes MTU=1500 NM_CONTROLLED=no IPV6INIT=no bridge still reported for the enp6s0 interface, although it shouldn't, cause the bridge is on the vlan now.
Verified on - vdsm-4.18.16-1.el7ev.x86_64 and 4.0.6-0.1.el7ev
*** Bug 1403935 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0044.html