File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ reset_waiter_timeout() {
452452 msg " Calculating timeout for register instance in target group $target_group_name "
453453 local health_check_interval=$( echo $target_group_info | awk ' {print $1}' )
454454 local health_check_timeout=$( echo $target_group_info | awk ' {print $2}' )
455- local health_check_threshold=$( echo $target_group_info | awk ' {print $2 }' )
455+ local health_check_threshold=$( echo $target_group_info | awk ' {print $3 }' )
456456 local timeout=$( echo " $health_check_threshold * ( $health_check_timeout + $health_check_interval )" | /usr/bin/bc)
457457 elif [ " $state_name " == " unused" ]; then
458458 msg " Getting target group arn for target group $target_group_name "
Original file line number Diff line number Diff line change @@ -445,9 +445,15 @@ reset_waiter_timeout() {
445445 if [ " $state_name " == " InService" ]; then
446446
447447 # Wait for a health check to succeed
448- local timeout =$( $AWS_CLI elb describe-load-balancers \
448+ local elb_info =$( $AWS_CLI elb describe-load-balancers \
449449 --load-balancer-name $elb \
450- --query \' LoadBalancerDescriptions[0].HealthCheck.Timeout\' )
450+ --query \' LoadBalancerDescriptions[0].HealthCheck.[HealthyThreshold,Interval,Timeout]\' \
451+ --output text)
452+
453+ local health_check_threshold=$( echo $elb_info | awk ' {print $1}' )
454+ local health_check_interval=$( echo $elb_info | awk ' {print $2}' )
455+ local health_check_timeout=$( echo $elb_info | awk ' {print $3}' )
456+ local timeout=$(( health_check_threshold * (health_check_interval + health_check_timeout)) )
451457
452458 elif [ " $state_name " == " OutOfService" ]; then
453459
You can’t perform that action at this time.
0 commit comments