Bug 1372798 - Setupnetworks not removing the "BRIDGE=" entry in ifcfg file when changing a untagged network to tagged
Summary: Setupnetworks not removing the "BRIDGE=" entry in ifcfg file when changing a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.6.8
Hardware: All
OS: Linux
high
high
Target Milestone: ovirt-4.0.6
: 4.0.5
Assignee: Petr Horáček
QA Contact: Michael Burman
URL:
Whiteboard:
: 1403935 (view as bug list)
Depends On:
Blocks: 1381880
TreeView+ depends on / blocked
 
Reported: 2016-09-02 18:07 UTC by nijin ashok
Modified: 2021-01-18 14:46 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1381880 (view as bug list)
Environment:
Last Closed: 2017-01-10 17:01:54 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:
danken: testing_plan_complete?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2425611 0 None None None 2016-11-29 05:37:47 UTC
Red Hat Product Errata RHBA-2017:0044 0 normal SHIPPED_LIVE vdsm 4.0.6 bug fix and enhancement update 2017-01-10 21:52:50 UTC
oVirt gerrit 63534 0 master ABANDONED net: reconfigure bond if it is not bridged anymore 2016-09-13 10:12:27 UTC
oVirt gerrit 63723 0 master MERGED net: edit bond detached from bridge but still attached to a vlan 2016-09-24 07:18:41 UTC
oVirt gerrit 64446 0 None None None 2016-09-28 10:12:53 UTC
oVirt gerrit 65219 0 ovirt-3.6 NEW net: edit bond detached from bridge but still attached to a vlan 2016-10-07 10:49:19 UTC
oVirt gerrit 65231 0 master NEW net: edit nic detached from bridge but still attached to a vlan 2016-10-07 12:46:13 UTC
oVirt gerrit 65232 0 ovirt-4.0 NEW net: edit nic detached from bridge but still attached to a vlan 2016-10-07 12:47:12 UTC

Description nijin ashok 2016-09-02 18:07:12 UTC
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:

Comment 1 nijin ashok 2016-09-02 18:10:32 UTC
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)
=====

Comment 4 Dan Kenigsberg 2016-09-04 08:01:17 UTC
Please include supervdsm.log as well.

Comment 8 Michael Burman 2016-10-05 10:28:57 UTC
Verified on - 4.0.5-0.1.el7ev and vdsm-4.18.15-1.el7ev.x86_64

Comment 9 Michael Burman 2016-10-06 08:15:51 UTC
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.

Comment 10 Michael Burman 2016-11-20 10:00:09 UTC
Verified on - vdsm-4.18.16-1.el7ev.x86_64 and 4.0.6-0.1.el7ev

Comment 11 Dan Kenigsberg 2016-12-12 20:04:28 UTC
*** Bug 1403935 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2017-01-10 17:01:54 UTC
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


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