Skip to content

Commit

Permalink
Merge pull request #167 from cevich/ignore_released
Browse files Browse the repository at this point in the history
Properly handle 'released' DH status
  • Loading branch information
cevich authored Dec 8, 2023
2 parents 61556ac + 9a08aa2 commit 851d152
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mac_pw_pool/LaunchInstances.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,20 @@ for name_hostid in "${NAME2HOSTID[@]}"; do
continue
fi

if [[ "$hoststate" == "pending" ]] || [[ "$hoststate" == "under-assessment" ]]; then
if [[ "$hoststate" == "pending" ]] || \
[[ "$hoststate" == "under-assessment" ]] || \
[[ "$hoststate" == "released" ]]
then
# When an instance is terminated, its dedicated host goes into an unusable state
# for about 1-1/2 hours. There's absolutely nothing that can be done to avoid
# this or work around it. Ignore hosts in this state, assuming a later run of the
# script will start an instance on the (hopefully) available host).
#
# I have no idea what 'under-assessment' means, and it doesn't last as long as 'pending',
# but functionally it behaves the same.
#
# Hosts in 'released' state are about to go away, hopefully due to operator action.
# Don't treat this as an error.
msg "Dedicated host is untouchable due to '$hoststate' state."
# Reference the actual output text, in case of false-match or unexpected contents.
echo "# $name HOST BUSY: $hoststate" > "$inststate"
Expand Down

0 comments on commit 851d152

Please sign in to comment.