Conversation
|
rework* of parameters |
|
if if either |
| ;; | ||
| --custom-memory*) | ||
| if [ ! "$2" ]; then | ||
| die 'ERROR: "--custome-memory" requires an argument' |
There was a problem hiding this comment.
| die 'ERROR: "--custome-memory" requires an argument' | |
| die 'ERROR: "--custom-memory" requires an argument' |
| # optionally add either machine type when neither --custom-memory | ||
| # nor --custom-cpu are specified | ||
| if [ -z "$MEM" ] || [ -z "$CPU" ]; then | ||
| echo "$MEM BLAAAAH $CPU" |
There was a problem hiding this comment.
I like set -x for debugging shell scripts! (echo works too 🙂--just a reminder to remove this line before we merge it in.)
| ) | ||
|
|
||
| # optionally add either machine type when neither --custom-memory | ||
| # nor --custom-cpu are specified |
There was a problem hiding this comment.
To be nitpicky about this comment: we're adding machine type when either --custom-memory or --custom cpu are not specified as well as when neither are specified. (You might say it "add machine type unless --custom-memory and --custom-cpu are specified".)
I could see having it throw an error if only one of the two is specified though.
bash start.sh $GCS_INSTANCE_NAME --server-account $GCS_SERVICE_ACCOUNT --project $GCS_PROJECT --custom-cpu 10 --custom-memory 64G --boot-disk-size=200GBis ok .... butbash start.sh $GCS_INSTANCE_NAME --server-account $GCS_SERVICE_ACCOUNT --project $GCS_PROJECT --boot-disk-size=200GB --custom-cpu 10 --custom-memory 64Gis notbecause
boot-disk-sizeis a param taken in through the@and at that pointMEMandCPUweren't specified soMACHINE_TYPEwas added by default to the list of params.In other words, set the flags that
start.shask for first then add flags accepted by GCP afterwards.I do not think this is new/unique to this case. This is probably just a new finding for me.