From: David Galloway Date: Wed, 22 Jun 2016 21:58:06 +0000 (-0400) Subject: cobbler: testnode post-install rc.local fixes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd8540b9be5e4c4cfa44943cda9ebba2edd6ebc2;p=ceph-cm-ansible.git cobbler: testnode post-install rc.local fixes - Instead of sleeping for 30 secs and hoping network is up, wait until we can reliably ping the Cobbler host. - Give ansible more time to run before wget's built-in 15min timeout is reached. Signed-off-by: David Galloway --- diff --git a/roles/cobbler/templates/snippets/cephlab_rc_local b/roles/cobbler/templates/snippets/cephlab_rc_local index 17bee594..63b61249 100644 --- a/roles/cobbler/templates/snippets/cephlab_rc_local +++ b/roles/cobbler/templates/snippets/cephlab_rc_local @@ -21,10 +21,15 @@ if [ -e $lockfile ]; then exit 0 fi -# Wait just a bit for the network to come up -sleep 30 +# Wait until we get 10 ping responses from Cobbler host +# before calling post-install trigger +until ping -nq -c10 $http_server +do + echo "Waiting for network" + sleep 3 +done # Run the post-install trigger a second time -wget -t1 -O /dev/null "http://$http_server:$http_port/cblr/svc/op/trig/mode/post/system/$system_name" || true +wget --timeout=1800 -t1 -O /dev/null "http://$http_server:$http_port/cblr/svc/op/trig/mode/post/system/$system_name" || true touch $lockfile EOF