[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH 7/9] ts-hosts-allocate-Executive: Score for equivalent previous failures
Ian Campbell writes ("Re: [OSSTEST PATCH 7/9] ts-hosts-allocate-Executive: Score for equivalent previous failures"): > On Tue, 2014-11-11 at 19:41 +0000, Ian Jackson wrote: > > + if ($candrow->{restype} eq 'host') { > > + $equivstatusq->execute($job,$fi->{intended},$fi->{branch}, > > + $hid->{Ident},$candrow->{resname}); > > + my $esrow = $equivstatusq->fetchrow_hashref(); > > For the first flight on a new branch (or perhaps a new blessing), this > will return an undef, because there is no previous flight to match, > won't it? Yes. > http://search.cpan.org/~timb/DBI-1.632/DBI.pm#fetchrow_hashref says if > you get an undef you should check $equivstatusq->err to see if that was > due to an error vs. empty result set. Not sure if you'll care given this > is all heuristics though. We turn on the automatic error trapping during db setup, so errors helpfully turn into die. > > + $candrow->{EquivMostRecentStatus} = $esrow->{status}; > > Meaning this will fail, or perhaps just produce a warning. $ perl -MData::Dumper -we 'use strict; my $y; print Dumper($y->{foo});' $VAR1 = undef; $ > > + print DEBUG "$dbg EQUIV-MOST-RECENT "; > > + print DEBUG ("$esrow->{flight}.$esrow->{job}". > > + " $esrow->{val} $esrow->{status}") if $esrow; > > + print DEBUG ".\n"; > > And so will these? if $esrow; > > @@ -505,12 +543,15 @@ sub hid_recurse ($$) { > > > > my $cost= $start_time > > + $duration_for_cost > > - - $previously_failed * 366*86400 > > + - ($previously_failed ==@hids ? 366*86400 : > > + $previously_failed_equiv==@hids ? 365*86400 : > > + 0) > > You've dropped the behaviour of multiplying 366*86400 by > $previously_failed, was that intentional? Yes. $previously_failed was the number of candidate hosts which had previous failures. Making the offset proportional to the number of hosts in the test is daft. > I think you've also gone to giving a bonus at all only if all @hids > previously failed, instead of just at least one of them. Yes. Should I write this better in the commit message ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |