Skip to content

Commit

Permalink
Warn users if bucket's region and cluster's region do not match (#329)
Browse files Browse the repository at this point in the history
* bucket region warning in create confirmation.

* adjust the height for new warning.
  • Loading branch information
willgraf committed May 23, 2020
1 parent bc08a51 commit 45f1757
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ function confirm_cluster_launch() {
dialog --backtitle "$BRAND" --title "GKE Login Failed" --clear --msgbox \
"${error_text[*]}" 9 65
else
local h=20
local h=18
local w=60
local bucket_region=$(gsutil ls -L -b "gs://${CLOUDSDK_BUCKET}" | grep "Location constraint" | awk '{print tolower($NF)}')
if [ "$CLOUDSDK_COMPUTE_REGION" = "$bucket_region" ]; then
Expand All @@ -613,8 +613,6 @@ function confirm_cluster_launch() {
"\n Project - ${CLOUDSDK_CORE_PROJECT}"
"\n Cluster Name - ${CLOUDSDK_CONTAINER_CLUSTER}"
"\n Bucket Name - ${CLOUDSDK_BUCKET}"
"\n Cluster Nodes - ${GKE_MACHINE_TYPE} (${NODE_MIN_SIZE} to ${NODE_MAX_SIZE} nodes)"
"\n GPU Nodes - ${GCP_PREDICTION_GPU_TYPE} (${GPU_NODE_MIN_SIZE} to ${GPU_NODE_MAX_SIZE} nodes)"
"${bucket_warning[*]}"
"\n\nPlease note that this process will take several minutes."
"If the cluster does not create successfully, it may be necessary to delete resources from the cloud console."
Expand Down

0 comments on commit 45f1757

Please sign in to comment.