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