[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 3/5] ms-flights-summary: Invent a `prep.alloc.' pseudo job state



This allows us to separate out `preparing' jobs into ones which are in
our data plan and ones which are not.  The ones which are not may not
have quite started to run ts-hosts-allocate, or may still be in the
planning queue and not made it into the projection.

In either case we don't have an estimated finish time for them.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ms-flights-summary | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/ms-flights-summary b/ms-flights-summary
index 98cca90..9a814ea 100755
--- a/ms-flights-summary
+++ b/ms-flights-summary
@@ -124,6 +124,9 @@ sub gather_stats($) {
 END
     for my $row (@{$stats}) {
        my ($job,$stat) = @$row;
+        if ($stat eq 'preparing') {
+            $stat = %{ $f->{Jobs}{$job}{Reso} } ? 'prep.alloc.' : 'preparing';
+        }
        $f->{Stats}{lc($stat)}++;
        $global_stats{lc($stat)}++;
     }
@@ -137,11 +140,12 @@ sub sort_stats($) {
     my %so = (
        queued => 1,
        preparing => 2,
-       blocked => 3,
-       running => 4,
-       pass => 5,
-       fail => 6,
-       broken => 7,
+       'prep.alloc.' => 3,
+       blocked => 4,
+       running => 5,
+       pass => 6,
+       fail => 7,
+       broken => 8,
     );
     return sort { ($so{$a}//0) <=> ($so{$b}//0) } (keys %{$stats});
 }
-- 
2.1.4


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

 


Rackspace

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