Tuesday, November 27, 2012

Device br0 does not seem to be present, delaying initialization.

I recently received this error on a CentOS Linux machine handed off to me. A bit of a head scratcher. Getting on the console and running ifup by hand looked like:
# bash -x ./ifup-eth ifcfg-br0
+ . /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
[...] The interesting part showed up a little later:
+ CONFIG=ifcfg-ifcfg-br0
+ '[' -f ifcfg-ifcfg-br0 ']'
+ CONFIG=ifcfg-br0
+ '[' -f ifcfg-br0 ']'
+ return
+ source_config
+ CONFIG=ifcfg-br0
+ DEVNAME=br0
+ . /etc/sysconfig/network-scripts/ifcfg-br0
++ DEVICE=br0
++ ONBOOT=yes
++ TYPE=bridge
++ BOOTPROTO=static
++ IPADDR=128.117.26.2
++ NETMASK=255.255.255.0
++ NM_CONTROLLED=no
+ '[' -r keys-br0 ']'
The eagle-eyed will have already spotted the error, the following helps the rest of us:
+ alias=
+ '[' 1 -eq 0 ']'
+ return 2
+ '[' -n '' ']'
+ '[' bridge = Bridge ']'
+ '[' bridge = Tap ']'
+ is_available br0
+ '[' -z br0 ']'
+ '[' -d /sys/class/net/br0 ']'
+ '[' -n '' ']'
++ modprobe -c
++ awk 'BEGIN { alias = ""; }
$1 == "alias" && $2 == "br0" { alias = $3; }
$1 == "install" { install[$2] = $3; }
END {
    cmd = install[alias];
    print alias;
    if (alias == "" || alias == "off" || cmd == "/bin/true" || cmd == ":")
        exit 1;
    exit 0;
}'
+ alias=
+ '[' 1 -eq 0 ']'
+ return 2
+ '[' -n '' ']'
+ net_log 'Device br0 does not seem to be present, delaying initialization.'
+ local 'message=Device br0 does not seem to be present, delaying initialization.'
+ local level=
+ local name=
+ '[' -z 'Device br0 does not seem to be present, delaying initialization.' ']'
+ '[' -z '' ']'
+ level=err
+ '[' -z '' ']'
+ name=./ifup-eth
+ echo Device br0 does not seem to be present, delaying initialization.
Device br0 does not seem to be present, delaying initialization.
+ '[' -x /usr/bin/logger ']'
+ /usr/bin/logger -p daemon.err -t ./ifup-eth 'Device br0 does not seem to be present, delaying initialization.'
+ return 0
+ exit 1
See the obvious "bridge = Bridge"? Well, maybe not if you're not at one with such things. Nonetheless, it takes a capital 'B' Bridge in /etc/sysconfig/network-scripts/ifcfg-br0

No comments: