[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



'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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.