File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,12 @@ function dump_nodes() {
420
420
all_selected_nodes+=( " ${windows_node_names[@]} " )
421
421
422
422
proc=${max_dump_processes}
423
+ start=" $( date +%s) "
424
+ # log_dump_ssh_timeout is the maximal number of seconds the log dumping over
425
+ # SSH operation can take. Please note that the logic enforcing the timeout
426
+ # is only a best effort. The actual time of the operation may be longer
427
+ # due to waiting for all the child processes below.
428
+ log_dump_ssh_timeout_seconds=" ${LOG_DUMP_SSH_TIMEOUT_SECONDS:- } "
423
429
for i in " ${! all_selected_nodes[@]} " ; do
424
430
node_name=" ${all_selected_nodes[$i]} "
425
431
node_dir=" ${report_dir} /${node_name} "
@@ -439,6 +445,11 @@ function dump_nodes() {
439
445
if [[ proc -eq 0 ]]; then
440
446
proc=${max_dump_processes}
441
447
wait
448
+ now=" $( date +%s) "
449
+ if [[ -n " ${log_dump_ssh_timeout_seconds} " && $(( now - start)) -gt ${log_dump_ssh_timeout_seconds} ]]; then
450
+ echo " WARNING: Hit timeout after ${log_dump_ssh_timeout_seconds} seconds, finishing log dumping over SSH shortly"
451
+ break
452
+ fi
442
453
fi
443
454
done
444
455
# Wait for any remaining processes.
You can’t perform that action at this time.
0 commit comments