diff --git a/jobs/cloud_controller_worker/spec b/jobs/cloud_controller_worker/spec index 49cddd7a19..1e58a04482 100644 --- a/jobs/cloud_controller_worker/spec +++ b/jobs/cloud_controller_worker/spec @@ -78,7 +78,7 @@ properties: cc.readiness_port.cloud_controller_worker: description: "Readiness port used in k8s to check that db migrations are complete before component update" - default: 9025 + default: -1 cc.jobs.global.timeout_in_seconds: description: "The longest any job can take before it is cancelled unless overriden per job" diff --git a/jobs/cloud_controller_worker/templates/post-start.sh.erb b/jobs/cloud_controller_worker/templates/post-start.sh.erb index ae1bd34fc8..d84c411deb 100644 --- a/jobs/cloud_controller_worker/templates/post-start.sh.erb +++ b/jobs/cloud_controller_worker/templates/post-start.sh.erb @@ -13,7 +13,11 @@ function fix_bundler_home_permissions { fix_bundler_home_permissions +<% if_p("cc.readiness_port.cloud_controller_worker") do |prop| %> +<% if prop > 0 %> while ! nc -z localhost <%= p("cc.readiness_port.cloud_controller_worker") %> do sleep 1 done +<% end %> +<% end %>