Skip to content

Commit

Permalink
Add logic in rotation scirpt of checking if compute fleet STOPPED (#2468
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hehe7318 authored Sep 23, 2023
1 parent 02c0676 commit 49dcba2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ MUNGE_USER="<%= @munge_user %>"
MUNGE_GROUP="<%= @munge_group %>"
CLUSTER_USER="<%= @cluster_user %>"

# Check compute fleet status
compute_fleet_status=$(get-compute-fleet-status.sh)
if ! echo "$compute_fleet_status" | grep -q '"status": "STOPPED"'; then
echo "Compute fleet is not stopped. Please stop it before updating the munge key."
exit 1
fi

# If SECRET_ARN is provided, fetch the munge key from Secrets Manager
if [ -n "${SECRET_ARN}" ]; then
echo "Fetching munge key from AWS Secrets Manager: ${SECRET_ARN}"
Expand Down

0 comments on commit 49dcba2

Please sign in to comment.