WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Re: network-bridge fails leaving tmpbridge around

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-users] Re: network-bridge fails leaving tmpbridge around
From: "Weismueller, Jonas" <jonas.weismueller@xxxxxxxxxx>
Date: Tue, 15 May 2007 09:16:44 +0200
Cc: "Richard W.M. Jones" <rjones@xxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 15 May 2007 00:11:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070511150005.GL9058@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <46444FB4.7060500@xxxxxxxxxx> <20070511115118.GB9058@xxxxxxxxxx> <46445DFE.5070304@xxxxxxxxxx> <464461B9.6030206@xxxxxxxxxx> <46446F90.7070506@xxxxxxxxxx> <20070511133924.GH9058@xxxxxxxxxx> <4644754D.5020201@xxxxxxxxxx> <20070511150005.GL9058@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.0 (X11/20070326)
Daniel P. Berrange wrote:

But given the place in the network-bridge scrpit where you say it is failing,
the tmpbridge device has not been brought up yet, so I've no clue how it
got into that state.

As a nasty hack you can try changing op_start method from

    ip link set ${netdev} name ${pdev}
    ip link set ${tdev} name ${bridge}

To

    ip link set ${netdev} name ${pdev}
    ip link set ${tdev} link down
    ip link set ${tdev} name ${bridge}

But I'd really like to know why it was in the UP state at all. So it'd
be useful if you could edit op_start and put in a call 'ifconfig ${tdev}'
and "echo doing stage ...blah..." in between every step in op_start() to see just where it gets into the UP state

Dan.
I disabled libvirtd in the runlevel to get rid of the virbr0 device and rebooted. The result is shown in the *.before files.
I changed the lines in op_start as you said:
op_start () {
...
#    ip link set ${netdev} name ${pdev}
#    ip link set ${tdev} name ${bridge}
    ip link set ${netdev} name ${pdev}
    ip link set ${tdev} link down
    ip link set ${tdev} name ${bridge}
...

A /etc/init.d/xend start results in the *.after files.

Debugging the code results in:
[root@scp-156 ~]# /etc/xen/scripts/network-bridge start
stage 1
tmpbridge: error fetching interface information: Device not found

Attached you will find the code block of op_start{}

Regards Jonas
op_start () {
    if [ "${bridge}" = "null" ] ; then
        return
    fi
        echo 'stage 1'
        ifconfig ${tdev}
    if link_exists "$pdev"; then
        # The device is already up.
        return
    fi
        echo 'stage 2'
        ifconfig ${tdev}

    create_bridge ${tdev}
        echo 'stage 3'
        ifconfig ${tdev}

    preiftransfer ${netdev}
        echo 'stage 4'
        ifconfig ${tdev}

    transfer_addrs ${netdev} ${tdev}
        echo 'stage 5'
        ifconfig ${tdev}

    if ! ifdown ${netdev}; then
        # If ifdown fails, remember the IP details.
        get_ip_info ${netdev}
        ip link set ${netdev} down
        ip addr flush ${netdev}
    fi
        echo 'stage 6'
        ifconfig ${tdev}

    ip link set ${netdev} name ${pdev}
        echo 'stage 7'
        ifconfig ${tdev}

    ip link set ${tdev} name ${bridge}
        echo 'stage 8'
        ifconfig ${tdev}

#    ip link set ${netdev} name ${pdev}
#    ip link set ${tdev} link down
#    ip link set ${tdev} name ${bridge}

    setup_bridge_port ${pdev}
        echo 'stage 9'
        ifconfig ${tdev}


    add_to_bridge2 ${bridge} ${pdev}
        echo 'stage 10'
        ifconfig ${tdev}

    do_ifup ${bridge}
        echo 'stage 11'
        ifconfig ${tdev}


    if [ ${antispoof} = 'yes' ] ; then
        antispoofing
    fi
        echo 'stage 12'
        ifconfig ${tdev}

}
bridge name     bridge id               STP enabled     interfaces
tmpbridge               8000.000000000000       no              
virbr0          8000.000000000000       no              
bridge name     bridge id               STP enabled     interfaces
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:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:200 (200.0 b)  TX bytes:200 (200.0 b)

peth0     Link encap:Ethernet  HWaddr 00:30:05:C4:99:E2  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:674117 errors:0 dropped:0 overruns:0 frame:0
          TX packets:449 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:50516088 (48.1 MiB)  TX bytes:67552 (65.9 KiB)
          Base address:0x4840 Memory:d0500000-d0520000 

tmpbridge Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:172.16.135.156  Bcast:172.16.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    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:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr 00:30:05:C4:99:E2  
          inet addr:172.16.135.156  Bcast:172.16.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:669612 errors:0 dropped:0 overruns:0 frame:0
          TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:50159030 (47.8 MiB)  TX bytes:24776 (24.1 KiB)
          Base address:0x4840 Memory:d0500000-d0520000 

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:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:200 (200.0 b)  TX bytes:200 (200.0 b)

172.16.0.0/16 dev eth0  proto kernel  scope link  src 172.16.135.156 
default via 172.16.1.16 dev eth0 
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users