hydra-evaluator: Don't use the "timeout" command
"timeout" does not propagate PR_SET_PDEATHSIG, so it prevents hydra-eval-jobset from being killed when hydra-evaluator quits.
This commit is contained in:
parent
d1afb42f12
commit
242ea8009f
|
@ -27,8 +27,6 @@ struct Evaluator
|
||||||
|
|
||||||
typedef std::map<JobsetName, Jobset> Jobsets;
|
typedef std::map<JobsetName, Jobset> Jobsets;
|
||||||
|
|
||||||
int evalTimeout = 3600;
|
|
||||||
|
|
||||||
size_t maxEvals = 4;
|
size_t maxEvals = 4;
|
||||||
|
|
||||||
struct State
|
struct State
|
||||||
|
@ -87,7 +85,7 @@ struct Evaluator
|
||||||
assert(jobset.pid == -1);
|
assert(jobset.pid == -1);
|
||||||
|
|
||||||
jobset.pid = startProcess([&]() {
|
jobset.pid = startProcess([&]() {
|
||||||
Strings args = { "timeout", "-s", "KILL", std::to_string(evalTimeout), "hydra-eval-jobset", jobset.name.first, jobset.name.second };
|
Strings args = { "hydra-eval-jobset", jobset.name.first, jobset.name.second };
|
||||||
execvp(args.front().c_str(), stringsToCharPtrs(args).data());
|
execvp(args.front().c_str(), stringsToCharPtrs(args).data());
|
||||||
throw SysError(format("executing ‘%1%’") % args.front());
|
throw SysError(format("executing ‘%1%’") % args.front());
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,6 +31,8 @@ my $plugins = [Hydra::Plugin->instantiate(db => $db, config => $config)];
|
||||||
|
|
||||||
my $dryRun = defined $ENV{'HYDRA_DRY_RUN'};
|
my $dryRun = defined $ENV{'HYDRA_DRY_RUN'};
|
||||||
|
|
||||||
|
alarm 3600; # FIXME: make configurable
|
||||||
|
|
||||||
|
|
||||||
sub parseJobName {
|
sub parseJobName {
|
||||||
# Parse a job specification of the form `<project>:<jobset>:<job>
|
# Parse a job specification of the form `<project>:<jobset>:<job>
|
||||||
|
|
Loading…
Reference in a new issue