From 68f5d448653a3d83593a198c386295555483172a Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Wed, 14 Mar 2018 14:54:53 -0700 Subject: [PATCH] Fix deprecated gcloud compute networks --mode switches. "create --mode" becomes "create --subnet-mode", and switch-mode has been folded into "update". Create --mode was deprecated in October and will be removed in the next gcloud release. It is already failing in staging tests. --- cluster/gce/util.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 5838ec052a..0fb7847933 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1639,7 +1639,7 @@ function create-network() { network_mode="custom" fi echo "Creating new ${network_mode} network: ${NETWORK}" - gcloud compute networks create --project "${NETWORK_PROJECT}" "${NETWORK}" --mode="${network_mode}" + gcloud compute networks create --project "${NETWORK_PROJECT}" "${NETWORK}" --subnet-mode="${network_mode}" else PREEXISTING_NETWORK=true PREEXISTING_NETWORK_MODE="$(check-network-mode)" @@ -1674,8 +1674,8 @@ function create-network() { } function expand-default-subnetwork() { - gcloud compute networks switch-mode "${NETWORK}" \ - --mode custom \ + gcloud compute networks update "${NETWORK}" \ + --switch-to-custom-subnet-mode \ --project "${NETWORK_PROJECT}" \ --quiet || true gcloud compute networks subnets expand-ip-range "${NETWORK}" \