Skip to content

Commit

Permalink
monit_utils: Add support for more than 10 cc workers
Browse files Browse the repository at this point in the history
- #267 identified a
  bug where the wait_unmonitor_job function assumed there would be less
  than 10 cloud controller workers
- this fix removes the less than 10 worker assumption and looks for the job_name in the
  regex

Authored-by: Kyle Ong <[email protected]>
  • Loading branch information
ohkyle committed Oct 18, 2022
1 parent 282227c commit 52eb61d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/capi_utils/monit_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function wait_unmonitor_job() {
local job_name="$1"

while true; do
if [[ $(sudo /var/vcap/bosh/bin/monit summary | grep ${job_name} ) =~ not[[:space:]]monitored[[:space:]]*$ ]]; then
if [[ $(sudo /var/vcap/bosh/bin/monit summary | grep ${job_name} ) =~ .*${job_name}.*[[:space:]]not[[:space:]]monitored[[:space:]]; then
echo "Unmonitored ${job_name}"
return 0
else
Expand Down

0 comments on commit 52eb61d

Please sign in to comment.