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
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index a4b3e06..44e8dc1 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -383,13 +383,12 @@
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'