diff options
author | Pascal Terjan <pterjan@mageia.org> | 2018-10-14 21:23:06 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2018-10-14 21:23:06 +0000 |
commit | 71c0127b2afcfa59a780926dfd05605133b833fb (patch) | |
tree | 4155698338052e1ed906fb9392290cc5bb472857 /ulri | |
parent | 38c5d9234ba38a96d59265f7256b22ca44543ec0 (diff) | |
download | iurt-71c0127b2afcfa59a780926dfd05605133b833fb.tar iurt-71c0127b2afcfa59a780926dfd05605133b833fb.tar.gz iurt-71c0127b2afcfa59a780926dfd05605133b833fb.tar.bz2 iurt-71c0127b2afcfa59a780926dfd05605133b833fb.tar.xz iurt-71c0127b2afcfa59a780926dfd05605133b833fb.zip |
Try killing the build when ulri sees a timeout
This only matters if the build node for some reason has a larger
timeout than the main config, in which case we were forgetting about
it.
Diffstat (limited to 'ulri')
-rwxr-xr-x | ulri | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -299,11 +299,17 @@ foreach my $prefix (keys %pkg_tree) { # Everything is fine, build is continuing! next bot; } - # TODO: In case of timeout, kill it! - # It should be a matter of kill -14 $pid, that should trigger cleanup - # We should then keep the lock and wait to fetch/clean the logs - plog('FAIL', "$bot timed out on $host/$arch ($seconds sec) or " . - "it's dead (status $proc_state), removing lock"); + if ($timeout) { + plog('FAIL', "$bot timed out on $host/$arch ($seconds sec), killing it"); + ssh($remote, "kill -14 $pid"); + # Give it some time to die/cleanup + if ($seconds < 1.02 * $config->{faildelay}) { + next bot; + } + plog('FAIL', "$bot didn't die after timing out on $host/$arch, removing lock"); + } else { + plog('FAIL', "$bot died on $host/$arch (status $proc_state), removing lock"); + } $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 0; } @@ -315,6 +321,7 @@ foreach my $prefix (keys %pkg_tree) { $run{bot}{$host}{$bot} = 0; if (!$status) { + # TODO: fetch/clean the logs next bot; } |