Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 768256 - network layout is incorrect when configure network with nic up
network layout is incorrect when configure network with nic up
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node (Show other bugs)
5.8
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Mike Burns
Virtualization Bugs
:
Depends On:
Blocks: 781929
  Show dependency treegraph
 
Reported: 2011-12-16 02:28 EST by Mohua Li
Modified: 2016-04-26 12:01 EDT (History)
11 users (show)

See Also:
Fixed In Version: ovirt-node-1.0-84.el5
Doc Type: Bug Fix
Doc Text:
In certain situations, network reconfiguration would fail to clean up before loading the new configuration. This resulted in multiple bridges and incorrectly configured interfaces being created. The existing network configuration files are now explicitly removed prior to loading the new configuration.
Story Points: ---
Clone Of:
: 781929 (view as bug list)
Environment:
Last Closed: 2012-02-21 00:05:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ovirt.log (42.08 KB, text/plain)
2011-12-16 02:30 EST, Mohua Li
no flags Details
Patch (1.26 KB, patch)
2012-01-10 18:16 EST, Mike Burns
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0168 normal SHIPPED_LIVE Important: rhev-hypervisor5 security and bug fix update 2012-02-21 05:01:32 EST

  None (edit)
Description Mohua Li 2011-12-16 02:28:47 EST
Description of problem
                                                                             
configure eth0 first, then ifup all the left nics(eth1,eth2,eth3), then try  
+to configure other nics in ovirt-node, this will make the network layout    
+totally wrong which compare                                                 
to didn't "ifup" all the left nics,  if didn't "ifup" the left nics, won't   
+have such situation,       

[root@localhost ~]# ifconfig
breth0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:3204 (3.1 KiB)

breth2    Link encap:Ethernet  HWaddr 52:54:00:3A:76:7F
          inet addr:10.66.9.39  Bcast:10.66.11.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3446 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:394942 (385.6 KiB)  TX bytes:15916 (15.5 KiB)

eth2      Link encap:Ethernet  HWaddr 52:54:00:3A:76:7F
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4372 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:447535 (437.0 KiB)  TX bytes:17212 (16.8 KiB)
          Interrupt:10 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2432 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2432 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:355851 (347.5 KiB)  TX bytes:355851 (347.5 KiB)

[root@localhost ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
breth0          8000.000000000000       no
breth2          8000.5254003a767f       no              eth2
[root@localhost ~]# ls /config/etc/sysconfig/network-scripts/
ifcfg-breth0  ifcfg-breth2  ifcfg-eth0  ifcfg-eth1  ifcfg-eth2  ifcfg-lo
         

Version-Release number of selected component (if applicable):
                                                                             rhev-hypervisor5-5.8-20111214.0.el5                                          

How reproducible:
100%, if ifup the nic first

Steps to Reproduce:
                                                                      
                                                                            1,configure eth0 in ovirt-node,                                              
2,ifup all the left nics,                                                    
3,configure eth1 or eth2 in ovirt-node,                                      
4,get 2 bridge persisted,    
  
Actual results:
persist several bridge file

Expected results:


Additional info:
Comment 1 Mohua Li 2011-12-16 02:30:16 EST
Created attachment 547623 [details]
ovirt.log
Comment 3 Mike Burns 2012-01-10 18:11:52 EST
Problem results from not cleaning up files and persistence when a network is reconfigured and multipath holding the files busy.
Comment 4 Mike Burns 2012-01-10 18:16:57 EST
Created attachment 551965 [details]
Patch

Note:  I could only reproduce this by booting iso, configuring, installing to disk, and on boot from disk, changing the network device.

Testing:

boot iso
set password
configure networking (eth0)
install locally and reboot
boot from disk
configure network (eth1)
check ifconfig output -- should see only breth1, lo, eth1
Comment 6 Mike Burns 2012-01-12 19:51:08 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In certain situations, network reconfiguration would fail to cleanup after itself resulting multiple bridges and incorrectly configured interfaces.  The previous network files are now explicitly cleaned up correctly.
Comment 7 Guohua Ouyang 2012-01-12 22:25:36 EST
Verified on 5.8-20120111.0:
1. configure eth0 during install.
2. install locally and reboot.
3. login and check ifconfig output, see breth0, eth0.
4. ifup eth1.
5. configure eth1 in "setup".
6. check ifconfig output, only see breth1, eth1.
Comment 8 Guohua Ouyang 2012-01-21 01:09:35 EST
Re-open this bug, change network deleted the loopback device lo, which will cause vdsmd failed to run:

[root@unused ~]# grep -A3 -B3 down /etc/init.d/vdsmd
     start)
        if ! ifconfig lo | grep -q UP;
        then
            log_failure_msg "VDSMD: lo interface is down, can't run !"
            echo "VDSMD: lo interface is down, can't run !" > /dev/kmsg
            exit 1
        fi


Should keep lo device when changed network.
Comment 9 Mike Burns 2012-01-25 00:23:40 EST
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 0d57b8c..c543605 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -491,9 +491,9 @@ else
                     if [ -n "${NIC}" ] && [[ "${NICS}" =~ "${NIC}" ]]; then
                         # ensure all network devices and dhclient processes are stopped
                         service network stop; killall dhclient
-                        remove_config /etc/sysconfig/network-scripts/ifcfg-*
+                        remove_config /etc/sysconfig/network-scripts/ifcfg-*eth*
                         service multipathd restart 2>&1 >/dev/null
-                        rm -f /etc/sysconfig/network-scripts/ifcfg-*
+                        rm -f /etc/sysconfig/network-scripts/ifcfg-*eth*
                         configure_interface $NIC
                     else
                         printf "\nInvalid option selected.\n"
Comment 11 Guohua Ouyang 2012-01-31 02:13:27 EST
verified on 5.8-20120130.0 build:
the loopback device lo is reserved after change network, and rhevh itself show up in RHEVM correctly(vdsmd is running).
Comment 12 Stephen Gordon 2012-02-09 16:35:42 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In certain situations, network reconfiguration would fail to cleanup after itself resulting multiple bridges and incorrectly configured interfaces.  The previous network files are now explicitly cleaned up correctly.+In certain situations, network reconfiguration would fail to clean up before loading the new configuration. This resulted  in multiple bridges and incorrectly configured interfaces being created. The existing network configuration files are now explicitly removed prior to loading the new configuration.
Comment 13 errata-xmlrpc 2012-02-21 00:05:33 EST
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.

http://rhn.redhat.com/errata/RHSA-2012-0168.html

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