Skip to content

Commit

Permalink
Do not use readiness port on worker by default
Browse files Browse the repository at this point in the history
TODO: work in progress

Fixes #256
  • Loading branch information
Samze committed Aug 27, 2024
1 parent c4fc8db commit 8c7fa10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jobs/cloud_controller_worker/spec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions jobs/cloud_controller_worker/templates/post-start.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>

0 comments on commit 8c7fa10

Please sign in to comment.