Skip to content

Commit

Permalink
Wakeup controllers before checking their number
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodlop committed Aug 24, 2024
1 parent fe62a3d commit 1422d09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blueprints/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ tf-destroy-wl () {
local root="$1"
export TF_LOG_PATH="$SCRIPTDIR/$root/terraform.log"
retry 3 "terraform -chdir=$SCRIPTDIR/$root destroy -target=module.eks_blueprints_addon_cbci -auto-approve"
#retry 3 "terraform -chdir=$SCRIPTDIR/$root destroy -target=module.eks_blueprints_addons -auto-approve"
retry 3 "terraform -chdir=$SCRIPTDIR/$root destroy -target=module.eks_blueprints_addons -auto-approve"
}

probes () {
Expand All @@ -122,8 +122,6 @@ probes () {
INFO "Initial Admin Password: $INITIAL_PASS."
fi
if [ "$root" == "02-at-scale" ]; then
until [ "$(eval "$(tf-output "$root" cbci_controllers_pods)" | awk '{ print $3 }' | grep -v STATUS | grep -v -c Running)" == 0 ]; do sleep $wait && echo "Waiting for Controllers Pod to get into Ready State..."; done ;\
eval "$(tf-output "$root" cbci_controllers_pods)" && INFO "All Controllers Pods are Ready."
GLOBAL_PASS=$(eval "$(tf-output "$root" global_password)") && \
if [ -n "$GLOBAL_PASS" ]; then
INFO "Password for admin_cbci_a: $GLOBAL_PASS."
Expand All @@ -145,6 +143,8 @@ probes () {
fi
until eval "$(tf-output "$root" cbci_controller_c_hpa)"; do sleep $wait && echo "Waiting for Team C HPA to get Ready..."; done ;\
INFO "Team C HPA is Ready."
until [ "$(eval "$(tf-output "$root" cbci_controllers_pods)" | awk '{ print $3 }' | grep -v STATUS | grep -v -c Running)" == 0 ]; do sleep $wait && echo "Waiting for Controllers Pod to get into Ready State..."; done ;\
eval "$(tf-output "$root" cbci_controllers_pods)" && INFO "All Controllers Pods are Ready."
until [ "$(eval "$(tf-output "$root" cbci_agent_windowstempl_events)" | grep -c 'Allocated Resource vpc.amazonaws.com')" -ge 1 ]; do sleep $wait && echo "Waiting for Windows Template Pod to allocate resource vpc.amazonaws.com"; done ;\
eval "$(tf-output "$root" cbci_agent_windowstempl_events)" && INFO "Windows Template Example is OK."
until [ "$(eval "$(tf-output "$root" cbci_agent_linuxtempl_events)" | grep -c 'Created container maven')" -ge 2 ]; do sleep $wait && echo "Waiting for both Linux Template Pods (On demand and Spot) to create maven container"; done ;\
Expand Down

0 comments on commit 1422d09

Please sign in to comment.