Commit d559b8ca authored by Mike Hibler's avatar Mike Hibler

Move the "not participating" check down too.

parent 81876725
......@@ -320,15 +320,6 @@ sleep(int(rand(5)));
&get_topo($topology_file, $ptopology_file, 0);
&debug_top();
#
# If it has been determined that we are not a part of the run,
# exit now so we don't screw up the barrier synchs.
#
if (!exists($hostmap{$hostname})) {
&debug("$hostname not participating in this linktest run.\n");
exit(0);
}
#
# Finally, see who the master is for synchronization.
# We prefer the synch server node for the experiment, but if that node
......@@ -341,7 +332,7 @@ if ($ssname) {
($synserv) = split/\./, $results[0];
chomp $synserv;
}
if (!$synserv || !exists($hostmap{$synserv})) {
if (@hosts > 0 && (!$synserv || !exists($hostmap{$synserv}))) {
$synserv = $hosts[0];
}
&debug("Synch master is $synserv\n");
......@@ -394,6 +385,19 @@ if (@links == 0) {
exit(EXIT_OK);
}
#
# If it has been determined that we are not a part of the run,
# exit now so we don't screw up the barrier synchs. Note that post_event
# will only happen if we are the synch server and we can only be the
# synch server if no other node is participating in the run either.
#
if (!exists($hostmap{$hostname})) {
&debug("$hostname not participating in this linktest run.\n");
&sim_event(EVENT_LOG,"Linktest skipped, no nodes participating");
&post_event(EVENT_COMPLETE,"ERROR=0 CTOKEN=$token");
exit(EXIT_OK);
}
#
# All nodes remove local temporary files remaining from the last
# run, if any.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment