[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH OSSTEST v4] ms-flights-summary: Produce an HTML report of all active flights
On Fri, 2015-09-18 at 11:27 +0100, Ian Campbell wrote: > On Fri, 2015-09-18 at 10:02 +0100, Ian Campbell wrote: > > On Wed, 2015-09-16 at 14:07 +0100, Ian Campbell wrote: > > > [...] > > > +sub add_event($$$$$) { > > > + my ($job,$reso,$type,$info,$time) = @_; > > > + > > > + die unless $type =~ m/^(Start|End)/; > > > + > > > + $job->{OverallTime} //= {}; > > > + > > > + $job->{Reso}{$reso} //= {}; > > > + $job->{Reso}{$reso}{$type} = $time; > > > + > > > + if ($type eq "Start") { > > > + die if $job->{Reso}{$reso}{Info}; > > > > This is attempting to check for conflicting events. > > > > However in the case of sharing hosts as noted in the commit message > > there > > is a gotcha which is that while the host is being prepared by one job > > the > > rest appears as rogue/anonymous jobs (with Info==(preparing), FWIW) and > > I've just observed this happen because 2 of those had the same start > > time > > (which I suppose will be quite common?). > > > > The attached plan shows this for the sharing of 'host grain-weevil' for > > "build-wheezy-i386 e1adb8b552dda5c653958083c9c7457f0398ad09" purposes. > > > > Anonymous jobs use $reso + $info as their (faked) job name, so they end > > up > > clashing here. > > > > I did the below as a quick fix, now I'm wondering if perhaps I should > > suffix the faked up job name of these anon jobs with something unique > > from > > either $evt->{Share} or $evt->{Allocated}. > > > > ->{Allocated}{Shareix} looks promising. What do you think? > > This would be the following. So far I think this is the best option. We discussed this IRL and it turns out for these sorts of "clashing" shares the start and end should always be the same, and while ms-flights-summary could check this it's not really its responsibility to do so (and that failing to produce any output at all under these circumstances is totally suboptimal). Therefore I've dropped the sanity checks, as below. If ms-planner were to go mad then there might be some anomalous looking rogue jobs in the table, which is fine. I'm also going to colourise the "Scheduled" column to indicate more clearly when something is running right now. Ian. diff --git a/ms-flights-summary b/ms-flights-summary index 964ca18..ba51eaa 100755 --- a/ms-flights-summary +++ b/ms-flights-summary @@ -152,13 +152,8 @@ sub add_event($$$$$) { $job->{Reso}{$reso} //= {}; $job->{Reso}{$reso}{$type} = $time; - if ($type eq "Start") { - die "$job $reso $job->{Reso}{$reso}{Info}" - if ($job->{Reso}{$reso}{Info}//$info) ne $info; - $job->{Reso}{$reso}{Info} = $info; - } else { - die if $job->{Reso}{$reso}{Info} ne $info; - } + $job->{Reso}{$reso}{Info} = $info + if $type eq "Start"; my $cmp = $type eq "Start" ? sub { $_[0] < $_[1] ? $_[0] : $_[1] } : _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |