Comment 1 for bug 1271144

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: br0 not brought up by cloud-init script

I get the same behavior with 1.17.3, but NOT 1.16.6. With 1.16.6, the br0 interface is up.

I bootstrap using maas, and then juju ssh 0. This is what I see:
$ ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:50:d4:28
          inet addr:10.0.5.104 Bcast:10.0.5.255 Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe50:d428/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:14003 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6573 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:146427029 (146.4 MB) TX bytes:488564 (488.5 KB)

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1063 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1063 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:300269 (300.2 KB) TX bytes:300269 (300.2 KB)

This is the bit in cloud-init where it calls "service networking restart":
Cloud-init v. 0.7 running 'modules:final' at Mon, 24 Feb 2014 22:37:12 +0000. Up 9.17 seconds.
stop: Unknown instance:
networking stop/waiting
+ install -D -m 644 /dev/null /var/lib/juju/nonce.txt
+ printf %s\n user-admin:bootstrap
Cloud-init v. 0.7 finished at Mon, 24 Feb 2014 22:37:12 +0000. Datasource DataSourceMAAS [http://10.0.5.10/MAAS/metadata/]. Up 9.34 seconds

Note that there are two networking scripts, but service ends up calling the upstart one:
# ls -la /etc/init/networking.conf /etc/init.d/networking
-rwxr-xr-x 1 root root 2797 Feb 13 2012 /etc/init.d/networking
-rw-r--r-- 1 root root 388 Apr 5 2012 /etc/init/networking.conf

The network config in /etc/network seems fine:
# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
source /etc/network/eth0.config

and
# cat /etc/network/eth0.config
iface eth0 inet manual

auto br0
iface br0 inet dhcp
  bridge_ports eth0

If I call "service networking restart" right now, br0 will show up:
root@n9a4m:~# service networking restart
stop: Unknown instance:
networking stop/waiting
root@n9a4m:~# ifconfig
br0 Link encap:Ethernet HWaddr 52:54:00:50:d4:28
          inet addr:10.0.5.104 Bcast:10.0.5.255 Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe50:d428/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:31 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3145 (3.1 KB) TX bytes:2644 (2.6 KB)

eth0 Link encap:Ethernet HWaddr 52:54:00:50:d4:28
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:14811 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7078 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:146492049 (146.4 MB) TX bytes:556692 (556.6 KB)

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1435 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:388838 (388.8 KB) TX bytes:388838 (388.8 KB)

The cloud-init runcmd script in 1.16.6 is very different, and bigger. I went over it but couldn't find interesting changes in this area.