Updated Branches: refs/heads/master 85fc31ec7 -> 42c078422
ubuntu: Fix the wait_for_network method in the agent init script. The init script was waiting for cloudbr0 to come up, but it's not mandatory that this bridge is available. We now wait for at least one bridge to be up before starting the cloud agent. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/42c07842 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/42c07842 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/42c07842 Branch: refs/heads/master Commit: 42c078422cf1cb59aa3124667dff7ab2abae7553 Parents: 85fc31e Author: Wido den Hollander <[email protected]> Authored: Thu Jun 21 12:20:04 2012 +0200 Committer: Wido den Hollander <[email protected]> Committed: Thu Jun 21 12:20:04 2012 +0200 ---------------------------------------------------------------------- .../distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/42c07842/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in ---------------------------------------------------------------------- diff --git a/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in b/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in index ea47440..c4607cb 100755 --- a/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in +++ b/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in @@ -50,7 +50,9 @@ wait_for_network() { i=1 while [ $i -lt 10 ] do - if ip addr show cloudbr0 |grep -w inet > /dev/null 2>&1; then + # Under Ubuntu and Debian libvirt by default creates a bridge called virbr0. + # That's why we want more then 3 lines back from brctl, so that there is a manually created bridge + if [ "$(brctl show|wc -l)" -gt 2 ]; then break else sleep 1 @@ -74,9 +76,8 @@ start() { log_end_msg 1 exit 1 fi - - #FIXME: wait for network - wait_for_network + + wait_for_network if start-stop-daemon --start --quiet \ --pidfile "$PIDFILE" \
