[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 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.

diff --git a/ms-flights-summary b/ms-flights-summary
index 60b6b88..24eb844 100755
--- a/ms-flights-summary
+++ b/ms-flights-summary
@@ -153,7 +153,8 @@ sub add_event($$$$$) {
     $job->{Reso}{$reso}{$type} = $time;
 
     if ($type eq "Start") {
-       die if $job->{Reso}{$reso}{Info};
+       die "$reso $job->{Reso}{$reso}{Info}"
+           if $job->{Reso}{$reso}{Info};
        $job->{Reso}{$reso}{Info} = $info;
     } else {
        die if $job->{Reso}{$reso}{Info} ne $info;
@@ -203,6 +204,9 @@ sub gather_events() {
                # Fake up a name from the $reso and the event's info
                # field (if available).
                my $anon_job = join(" ", ($reso,$evt->{Info}));
+               $anon_job .= " (shared $evt->{Allocated}{Shareix})"
+                   if $evt->{Allocated};
+
                $anon_jobs{$anon_job} //= { Reso => {}, Anon => 1 };
                $job = $anon_jobs{$anon_job};
            }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.