File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1684,11 +1684,14 @@ task RandomZoneSpewer {
16841684 command <<<
16851685 set -eux
16861686
1687- # by no means a perfect solution, but that's not desired anyway
16881687 all_known_zones = ("us-central1-a" "us-central1-b" "us-central1-c" "us-central1-f" "us-east1-b" "us-east1-c" "us-east1-d" "us-east4-a" "us-east4-b" "us-east4-c" "us-west1-a" "us-west1-b" "us-west1-c" "us-west2-a" "us-west2-b" "us-west2-c" "us-west3-a" "us-west3-b" "us-west3-c" "us-west4-a" "us-west4-b" "us-west4-c" )
1689- for zone in "${all_known_zones[@]} " ; do echo "${zone} " >> zones.txt ; done
16901688
1691- shuf zones.txt | head -n ~{num_of_zones } | tr '\n' ' ' > "result.txt"
1689+ if [[ ~{num_of_zones } -eq 1 ]]; then
1690+ echo "us-central1-a" > result.txt
1691+ else
1692+ for zone in "${all_known_zones[@]} " ; do echo "${zone} " >> zones.txt ; done
1693+ shuf zones.txt | head -n ~{num_of_zones } | tr '\n' ' ' > result.txt
1694+ fi
16921695 >>>
16931696
16941697 output {
You can’t perform that action at this time.
0 commit comments