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

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] network-bridge fails leaving tmpbridge around
From: "Richard W.M. Jones" <rjones@xxxxxxxxxx>
Date: Fri, 11 May 2007 12:12:52 +0100
Delivery-date: Fri, 11 May 2007 04:11:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070302)
'service xend start' is failing in the network-bridge script. It fails in such a way as to kill the network completely and leave tmpbridge around.

I modified network-bridge by adding at the top:

        #!/bin/bash
        
        exec 2>/tmp/log
        set -x

so that I could see what commands are failing. The complete log is attached, but it turns out that the last thing logged is:

        + ifdown eth0
        + ip link set eth0 name peth0
        + ip link set tmpbridge name eth0
        SIOCSIFNAME: Device or resource busy

so it would seem to be failing here:

        op_start () {
        #...
        #...
            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
            ip link set ${netdev} name ${pdev}
            ip link set ${tdev} name ${bridge}    <--- fails

It's strange because tmpbridge has just been created and eth0 is down, so how can either device be busy?

Fedora 7, xen-3.1.0-0.rc7.1.fc7

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
++ dirname /etc/xen/scripts/network-bridge
+ dir=/etc/xen/scripts
+ . /etc/xen/scripts/xen-script-common.sh
++ set -e
+ . /etc/xen/scripts/xen-network-common.sh
++ '[' -e /etc/SuSE-release ']'
++ which ifup
+ findCommand start
+ for arg in '"$@"'
+ expr index start =
+ command=start
+ return
+ evalVariables start
+ for arg in '"$@"'
+ expr index start = '>' 1
++ ip route list
++ sed 's/.* dev //'
++ awk '/^default / { print $NF }'
+ netdev=eth0
+ bridge=eth0
+ antispoof=no
+ pdev=peth0
+ tdev=tmpbridge
+ case "$command" in
+ op_start
+ '[' eth0 = null ']'
+ link_exists peth0
+ ip link show peth0
+ return 1
+ create_bridge tmpbridge
+ local bridge=tmpbridge
+ '[' '!' -e /sys/class/net/tmpbridge/bridge ']'
+ preiftransfer eth0
+ true
+ transfer_addrs eth0 tmpbridge
+ local src=eth0
+ local dst=tmpbridge
+ ip addr show dev tmpbridge
+ egrep -q '^ *inet '
+ ip addr show dev eth0
+ egrep '^ *inet '
+ sed -e '
s/inet/ip addr add/
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/eth0/dev tmpbridge/
'
+ sh -e
+ ip route list
+ sed -ne '
/dev tmpbridge\( \|$\)/ {
  s/^/ip route del /
  p
}'
+ sh -e
+ ifdown eth0
+ ip link set eth0 name peth0
+ ip link set tmpbridge name eth0
SIOCSIFNAME: Device or resource busy

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users