File tree Expand file tree Collapse file tree
tests/remtran_origin.test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,16 +28,20 @@ commit
2828EOF
2929BG_PID=$!
3030
31- # Poll comdb2_active_osqls on DST_DB for the remtran session (argv0=comdb2.tsk)
31+ # comdb2_active_osqls is node-local, so poll every node in the cluster
32+ dst_nodes=$( cdb2sql --tabs $DST_OPT $DST_DB default " SELECT host FROM comdb2_cluster" 2> /dev/null)
33+
3234result=" "
3335for i in $( seq 1 12) ; do
3436 sleep 1
35- result=$( cdb2sql --tabs $DST_OPT $DST_DB default \
36- " SELECT origin, argv0 FROM comdb2_active_osqls WHERE argv0='comdb2.tsk'" 2> /dev/null)
37- if [[ -n " $result " ]]; then
38- echo " Found at poll $i : $result "
39- break
40- fi
37+ for node in $dst_nodes ; do
38+ result=$( cdb2sql --tabs --host " $node " $DST_OPT $DST_DB \
39+ " SELECT origin, argv0 FROM comdb2_active_osqls WHERE argv0='comdb2.tsk'" 2> /dev/null)
40+ if [[ -n " $result " ]]; then
41+ echo " Found at poll $i on $node : $result "
42+ break 2
43+ fi
44+ done
4145done
4246
4347wait $BG_PID || true
You can’t perform that action at this time.
0 commit comments