From a18a18367f592c332a0fcbe9629520fe67be2a48 Mon Sep 17 00:00:00 2001 From: Ian Chakeres Date: Tue, 18 Jul 2017 18:43:45 -0700 Subject: [PATCH] Check whether NODE_LOCAL_SSDS=0 and handle this case appropriately. Some versions of seq will count down from 1 if "seq 0" is specified --- cluster/gce/util.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index ed509660fc..9599ede705 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -576,9 +576,13 @@ function create-node-template() { local local_ssds="" if [[ ! -z ${NODE_LOCAL_SSDS+x} ]]; then + # The NODE_LOCAL_SSDS check below fixes issue #49171 + # Some versions of seq will count down from 1 if "seq 0" is specified + if [[ ${NODE_LOCAL_SSDS} -ge 1 ]]; then for i in $(seq ${NODE_LOCAL_SSDS}); do - local_ssds="$local_ssds--local-ssd=interface=SCSI " + local_ssds="$local_ssds--local-ssd=interface=SCSI " done + fi fi local network=$(make-gcloud-network-argument \