Commit 1a0da46f authored by Leigh B Stoller's avatar Leigh B Stoller

Move event start system startup to after WaitForNodes() returns. It did

not really matter before, but with new program agent support, we have to
start it after nodes are "ISUP". This is going to take a little more
work to get right, not sure if Restart() is going to work right?
parent fb3d560a
......@@ -1623,23 +1623,6 @@ sub Action($$$;$)
goto bad;
}
}
#
# Start the event scheduler.
#
if (!$reload) {
my $action = ($restart ? "replay" : "start");
system("$EVENTSYS $action $pid,$eid");
if ($?) {
$msg .= "Failed to (re)start the event system";
if ($TB ne "/usr/testbed") {
# Not sure why this is failing.
print STDERR "$msg\n";
}
else {
goto bad;
}
}
}
#
# Worked? Set the new state. Needs more thought ...
......@@ -1674,6 +1657,29 @@ sub Action($$$;$)
return -1;
}
}
elsif ($action eq "start" || $action eq "restart") {
$self->ComputeState();
if ($self->status() eq "ready") {
#
# Start the event scheduler. Note that the experiment is already
# in the ACTIVE state, so the scheduler is going to fire off the
# timeline automatically.
#
my $action = ($restart ? "replay" : "start");
system("$EVENTSYS $action $pid,$eid");
if ($?) {
$msg .= "Failed to (re)start the event system";
if ($TB ne "/usr/testbed") {
# Not sure why this is failing.
print STDERR "$msg\n";
}
else {
goto bad;
}
}
}
}
return 0;
bad:
......
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