Skip to content

Commit fc3498e

Browse files
if zone = 1, set us-central-a manually
1 parent 4f7e404 commit fc3498e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

wdl/tasks/Utility/Utils.wdl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)