Skip to content

Commit cb0838e

Browse files
committed
monit_utils: Add support for more than 10 cc workers
- #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 by looking for the job_name in the regex Authored-by: Kyle Ong <[email protected]>
1 parent 282227c commit cb0838e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/capi_utils/monit_utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function wait_unmonitor_job() {
8686
local job_name="$1"
8787

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

0 commit comments

Comments
 (0)