Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Start consul_agent before running pre-start scripts
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
mdelillo authored and chhhavi committed Dec 19, 2016
1 parent 3573449 commit 39e739f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions assets/scripts/start
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39e739f

Please sign in to comment.