Skip to content

Commit

Permalink
AWS: Handle kube-down case where the LaunchConfig is dangling
Browse files Browse the repository at this point in the history
Always query and attempt to delete the default launch-config
  • Loading branch information
zmerlynn committed Aug 17, 2016
1 parent ec7c58e commit ec33089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster/aws/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,11 @@ function kube-down {
done
echo "All instances deleted"
fi
if [[ -n $(${AWS_ASG_CMD} describe-launch-configurations --launch-configuration-names ${ASG_NAME} --query LaunchConfigurations[].LaunchConfigurationName) ]]; then
echo "Warning: default auto-scaling launch configuration ${ASG_NAME} still exists, attempting to delete"
echo " (This may happen if kube-up leaves just the launch configuration but no auto-scaling group.)"
${AWS_ASG_CMD} delete-launch-configuration --launch-configuration-name ${ASG_NAME} || true
fi

find-master-pd
find-tagged-master-ip
Expand Down

0 comments on commit ec33089

Please sign in to comment.