wait for head node to start before starting compute hosts

This commit is contained in:
Anthony Young 2011-09-16 00:28:23 -07:00
parent fde5a1cdd5
commit cbbf718fa9

View file

@ -19,6 +19,13 @@ function run_lxc {
# Launch the head node - headnode uses a non-ip domain name,
# because rabbit won't launch with an ip addr hostname :(
run_lxc STACKMASTER $HEAD_HOST "ENABLED_SERVICES=g-api,g-reg,key,n-api,n-sch,n-vnc,dash,mysql,rabbit"
# Wait till the head node is up
while ! wget -O - http://$HEAD_HOST | grep -q username; do
echo "Waiting for head node ($HEAD_HOST) to start..."
sleep 5
done
for compute_host in ${COMPUTE_HOSTS//,/ }; do
# Launch the compute hosts
run_lxc $compute_host $compute_host "ENABLED_SERVICES=n-cpu,n-net,n-api"