File tree Expand file tree Collapse file tree 4 files changed +34
-14
lines changed Expand file tree Collapse file tree 4 files changed +34
-14
lines changed Original file line number Diff line number Diff line change @@ -1921,7 +1921,9 @@ backend_nomad() {
1921
1921
;;
1922
1922
1923
1923
wait-pools-stopped )
1924
- local usage=" USAGE: wb backend $op RUN-DIR"
1924
+ local usage=" USAGE: wb backend $op SLEEP-SECONDS RUN-DIR"
1925
+ # This parameters is added by the nomad backend being used.
1926
+ local sleep_seconds=${1:? $usage } ; shift
1925
1927
local dir=${1:? $usage } ; shift
1926
1928
local generator_task=$( envjqr ' generator_task_name' )
1927
1929
@@ -1976,7 +1978,10 @@ backend_nomad() {
1976
1978
local elapsed=" $(( $(date +% s) - start_time)) "
1977
1979
echo -ne " \b\b\b\b\b\b"
1978
1980
printf " %6d" " ${elapsed} "
1979
- sleep 1
1981
+ # This time is different between local and cloud backends to avoid
1982
+ # unnecesary Nomad specific traffic and at the same time be less
1983
+ # sensitive to network failures.
1984
+ sleep " ${sleep_seconds} "
1980
1985
done # While
1981
1986
if ! test -f " ${dir} " /flag/cluster-stopping
1982
1987
then
Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ backend_nomadcloud() {
52
52
deploy-genesis-nomadcloud " $@ "
53
53
;;
54
54
55
+ wait-pools-stopped )
56
+ # It passes the sleep time (in seconds) required argument.
57
+ # This time is different between local and cloud backends to avoid
58
+ # unnecesary Nomad specific traffic (~99% happens waiting for node-0, the
59
+ # first one it waits to stop inside a loop) and at the same time be less
60
+ # sensitive to network failures.
61
+ backend_nomad wait-pools-stopped 60 " $@ "
62
+ ;;
63
+
55
64
fetch-logs )
56
65
# Only if running on "perf" exclusive nodes we use SSH, if not
57
66
# `nomad exec`, because we need to have an exclusive port open for us.
@@ -157,10 +166,6 @@ backend_nomadcloud() {
157
166
backend_nomad wait-node-stopped " $@ "
158
167
;;
159
168
160
- wait-pools-stopped )
161
- backend_nomad wait-pools-stopped " $@ "
162
- ;;
163
-
164
169
stop-all )
165
170
backend_nomad stop-all " $@ "
166
171
;;
Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ backend_nomadexec() {
52
52
deploy-genesis-nomadexec " $@ "
53
53
;;
54
54
55
+ wait-pools-stopped )
56
+ # It passes the sleep time (in seconds) required argument.
57
+ # This time is different between local and cloud backends to avoid
58
+ # unnecesary Nomad specific traffic (~99% happens waiting for node-0, the
59
+ # first one it waits to stop inside a loop) and at the same time be less
60
+ # sensitive to network failures.
61
+ backend_nomad wait-pools-stopped 1 " $@ "
62
+ ;;
63
+
55
64
# All or clean up everything!
56
65
# Called after `scenario.sh` without an exit trap!
57
66
stop-cluster )
@@ -113,10 +122,6 @@ backend_nomadexec() {
113
122
backend_nomad wait-node-stopped " $@ "
114
123
;;
115
124
116
- wait-pools-stopped )
117
- backend_nomad wait-pools-stopped " $@ "
118
- ;;
119
-
120
125
stop-all )
121
126
backend_nomad stop-all " $@ "
122
127
;;
Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ backend_nomadpodman() {
52
52
deploy-genesis-nomadpodman " $@ "
53
53
;;
54
54
55
+ wait-pools-stopped )
56
+ # It passes the sleep time (in seconds) required argument.
57
+ # This time is different between local and cloud backends to avoid
58
+ # unnecesary Nomad specific traffic (~99% happens waiting for node-0, the
59
+ # first one it waits to stop inside a loop) and at the same time be less
60
+ # sensitive to network failures.
61
+ backend_nomad wait-pools-stopped 1 " $@ "
62
+ ;;
63
+
55
64
# All or clean up everything!
56
65
# Called after `scenario.sh` without an exit trap!
57
66
stop-cluster )
@@ -113,10 +122,6 @@ backend_nomadpodman() {
113
122
backend_nomad wait-node-stopped " $@ "
114
123
;;
115
124
116
- wait-pools-stopped )
117
- backend_nomad wait-pools-stopped " $@ "
118
- ;;
119
-
120
125
stop-all )
121
126
backend_nomad stop-all " $@ "
122
127
;;
You can’t perform that action at this time.
0 commit comments