Skip to content

Commit b13c112

Browse files
authored
Prevent cx up on duplicate cluster (#708)
1 parent 5936fc6 commit b13c112

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

manager/install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ function ensure_eks() {
7373
cluster_status=$(echo "$cluster_info" | jq -r 'first | .Status')
7474
set -e
7575

76+
if [[ "$cluster_status" == "ACTIVE" ]] && [[ "$arg1" != "--update" ]]; then
77+
echo "error: there is already a cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION"
78+
exit 1
79+
fi
80+
7681
if [ "$cluster_status" == "DELETING" ]; then
7782
echo "error: your cortex cluster named \"$CORTEX_CLUSTER_NAME\" in $CORTEX_REGION is currently spinning down; please try again once it is completely deleted (may take a few minutes)"
7883
exit 1

0 commit comments

Comments
 (0)