[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 20/25] sg-report-host-history: Support flight:FLIGHT
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- sg-report-host-history | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sg-report-host-history b/sg-report-host-history index 8a4d40f..b3ef63e 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -162,6 +162,8 @@ END LIMIT 1 END + print DEBUG "QUERYING RUNVARS FOR $hostname\n"; + my @rows; $runvarq->execute($hostname); @@ -252,7 +254,25 @@ $dbh_tests->do("SET LOCAL enable_seqscan=false"); our %hosts; foreach my $host (@ARGV) { - $hosts{$host}++; + if ($host =~ m/^flight:/) { + my $flight=$'; #'; + db_retry($dbh_tests, [qw(flights)], sub { + our $hostsinflightq //= db_prepare(<<END); + SELECT DISTINCT val + FROM runvars + WHERE flight=? + AND (name = 'host' or name like '%_host') +END + $hostsinflightq->execute($flight); + while (my $row = $hostsinflightq->fetchrow_hashref()) { + $hosts{$row->{val}}++; + } + }); + } elsif ($host !~ m/:/) { + $hosts{$host}++; + } else { + die "$host ?"; + } } foreach my $host (sort keys %hosts) { -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |