From dc7ebbb9a42c5d497cb8de18842116c76096a72f Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 24 Jun 2014 13:59:49 +0100 Subject: [PATCH] XenAPI: Tail output from stack.sh While installing devstack in XenServer's DomU we can easily track the output so end-users have much more visibility of both what is going on and what (if anything!) went wrong. Change-Id: I7d12a13cea9dffda6c1388ce711b6adf76cae72c --- tools/xen/install_os_domU.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh index a4b3e06e88..44e8dc1793 100755 --- a/tools/xen/install_os_domU.sh +++ b/tools/xen/install_os_domU.sh @@ -383,13 +383,12 @@ if [ "$WAIT_TILL_LAUNCH" = "1" ] && [ -e ~/.ssh/id_rsa.pub ] && [ "$COPYENV" = sleep 10 done echo -n "devstack is running" - while ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "service devstack status | grep -q running"; do - sleep 10 - echo -n "." - done - echo "done!" set -x + # Watch devstack's output + pid=`ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS pgrep run.sh` + ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS "tail --pid $pid -n +1 -f /tmp/devstack/log/stack.log" + # Fail if devstack did not succeed ssh_no_check -q stack@$OS_VM_MANAGEMENT_ADDRESS 'test -e /var/run/devstack.succeeded'