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
pull/6/head
Ian Chakeres 2017-07-18 18:43:45 -07:00
parent 0dff56b4d8
commit a18a18367f
1 changed files with 5 additions and 1 deletions

View File

@ -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 \