Mailing List Archive

[OSSTEST PATCH 16/16] starvation: Do not count more than half a flight as starved
This seems like a sensible rule.

This also prevents the following bizarre behaviour: when a flight has
a handful of jobs that cannot be run at all (eg because it's a
commissioning flight for only hosts of a particular arch), those jobs
can complete quite quickly. Even with a high X value because only a
smallish portion of the flight has finished, this can lead to a modest
threshhold value. This combines particularly badly with commissioning
flights, where the duraation estimates are often nonsense.

Signed-off-by: Ian Jackson <>
ts-hosts-allocate-Executive | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index b216186a..459b9215 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -863,7 +863,7 @@ sub starving ($$) {
"D=%d W=%d X=%.3f t_D=%s t_me=%s t_lim=%.3f X'=%.4f (fi.s=%s)",
$d, $w, $X, $total_d, $projected_me, $lim, $Xcmp,
$fi->{started} - $now;
- my $bad = $projected_me > $lim;
+ my $bad = $projected_me > $lim && $d >= $w;
return ($bad, $m);