|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 07/13] Planner: ms-planner support -w option
We are going to introduce multiple concurrent streams of planning
processing, called `walkers' in ms-queuedaemon. The work-in-progress
plan is stored, server-side, during planning, in data-plan.pl. But we
need to have more than one of these.
Update ms-planner and ms-planner-debug to honour a -w option, to
specify a replacement for the word `plan' in `data-plan.pl'.
No overall functional change, since nothing uses these options yet.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
ms-planner | 6 +++++-
ms-planner-debug | 13 ++++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ms-planner b/ms-planner
index 1dd01a9..f2070b0 100755
--- a/ms-planner
+++ b/ms-planner
@@ -33,12 +33,16 @@ use Osstest::Executive;
open DEBUG, ">/dev/null" or die $!;
+our $walker = 'plan';
+
while (@ARGV and $ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
last if m/^--$/;
while (m/^-./) {
if (s/^-D/-/) {
open DEBUG, ">&STDERR" or die $!;
+ } elsif (s/^-w(.+)/-/) {
+ $walker = $1;
} else {
die "$_ ?";
}
@@ -49,7 +53,7 @@ csreadconfig();
our ($plan);
-my $fn= "data-plan.pl";
+my $fn= "data-$walker.pl";
sub allocations ($$) {
my ($init, $each) = @_;
diff --git a/ms-planner-debug b/ms-planner-debug
index e277ca6..eac5675 100755
--- a/ms-planner-debug
+++ b/ms-planner-debug
@@ -25,7 +25,14 @@ use Osstest;
csreadconfig();
-my $f= sprintf "data-plan-debug-%s.txt", time;
+my $walker = 'plan';
+
+if (@ARGV && $ARGV[0] =~ m/^-w(.+)$/) {
+ $walker = $1;
+ shift @ARGV;
+}
+
+my $f= sprintf "data-$walker-debug-%s.txt", time;
printf "%s\n", $f;
@@ -42,9 +49,9 @@ foreach my $arg (@ARGV) {
}
}
-print "==========data-plan.pl==========\n";
+print "==========data-$walker.pl==========\n";
-system 'cat data-plan.pl 2>&1';
+system 'cat data-$walker.pl 2>&1';
print "==========resources==========\n";
--
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 |