[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 26/29] Manual allocation: Provide JobInfo in mg-blockage
Supply most of the information about our allocations in JobInfo, rather than Xinfo. And, correspondingly, rename all the variables `xinfo' to `info'. Supply only the supplied hostname as the Xinfo. This is slightly redundant but it does at least tell us what came out of the db. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- v2: New patch --- mg-blockage | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mg-blockage b/mg-blockage index 0286c27..90547a5 100755 --- a/mg-blockage +++ b/mg-blockage @@ -14,7 +14,7 @@ csreadconfig(); die unless @ARGV==3 || @ARGV==4; die if $ARGV[0] =~ m/^=/; -our ($start,$end,$hostflag,$mxinfo) = @ARGV; +our ($start,$end,$hostflag,$minfo) = @ARGV; sub parsedate ($) { open D, "-|", qw(date +%s -d), @_ or die $!; @@ -24,13 +24,13 @@ sub parsedate ($) { return $r; } -my $basexinfo = manual_allocation_base_joinfo(); -my $xinfo = "blockage $basexinfo [$start .. $end]"; -$xinfo .= " $mxinfo" if defined $mxinfo; +my $baseinfo = manual_allocation_base_jobinfo(); +my $info = "blockage $baseinfo [$start .. $end]"; +$info .= " $minfo" if defined $minfo; $start = parsedate $start; $end = parsedate $end; -print $xinfo, "\n" or die $!; +print $info, "\n" or die $!; die unless $end > $start; @@ -38,7 +38,7 @@ sub min { (sort @_)[0]; } sub max { (reverse sort @_)[0]; } sub plan () { - alloc_resources(sub { + alloc_resources(JobInfo => $info, sub { my ($plan, $mayalloc) = @_; my $now = time; @@ -72,7 +72,7 @@ END foreach (my $ix=0; $ix<$avail; $ix++) { my $booking = { Reso => $res->{restype}.' '.$res->{resname}, - Xinfo => $xinfo, + Xinfo => $host, Start => $bookstart - $now, End => $bookend - $now, }; -- 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 |