Bug 768256 - network layout is incorrect when configure network with nic up
Summary: network layout is incorrect when configure network with nic up
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node
Version: 5.8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 781929
TreeView+ depends on / blocked
 
Reported: 2011-12-16 07:28 UTC by Mohua Li
Modified: 2016-04-26 16:01 UTC (History)
11 users (show)

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.
Clone Of:
: 781929 (view as bug list)
Environment:
Last Closed: 2012-02-21 05:05:33 UTC
Target Upstream Version:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0168 0 normal SHIPPED_LIVE Important: rhev-hypervisor5 security and bug fix update 2012-02-21 10:01:32 UTC

Description Mohua Li 2011-12-16 07:28:47 UTC
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 07:30:16 UTC
Created attachment 547623 [details]
ovirt.log

Comment 3 Mike Burns 2012-01-10 23:11:52 UTC
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 23:16:57 UTC
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-13 00:51:08 UTC
    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-13 03:25:36 UTC
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 06:09:35 UTC
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 05:23:40 UTC
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 07:13:27 UTC
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 21:35:42 UTC
    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 05:05:33 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.

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.