From 39e739fe7dab0521dc2bc9a8326431b38c916552 Mon Sep 17 00:00:00 2001 From: Mark DeLillo Date: Mon, 19 Dec 2016 10:33:02 -0500 Subject: [PATCH] Start consul_agent before running pre-start scripts * The cloud_controller_ng pre-start script will start consul if it is not already running. The pre-start script then stays alive unitl the consul_agent process dies, which means our SSH session running the pre-start script does not exit and `cf dev start` will never complete. [Fixes #136193823] Signed-off-by: Chhavi Kankaria --- assets/scripts/start | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/scripts/start b/assets/scripts/start index 5be7ef9..a4572de 100755 --- a/assets/scripts/start +++ b/assets/scripts/start @@ -28,10 +28,15 @@ while ! nc -z 127.0.0.1 3306; do sleep 1 done -for script in $(ls /var/vcap/jobs/*/bin/pre-start | grep -v '/mysql/'); do +/var/vcap/jobs/consul_agent/bin/pre-start + +start_services consul_agent + +for script in $(ls /var/vcap/jobs/*/bin/pre-start | grep -v '/mysql/' | grep -v '/consul_agent/'); do $script done -start_services consul_agent garden etcd uaa + +start_services garden etcd uaa while [[ ! /var/vcap/jobs/uaa/bin/dns_health_check ]]; do sleep 1