]> xenbits.xensource.com Git - osstest.git/commitdiff
Planner: ms-planner support -w option
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 1 Sep 2015 15:52:17 +0000 (16:52 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 10:29:19 +0000 (11:29 +0100)
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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
ms-planner
ms-planner-debug

index f38f05b17b9405310d0b305a7315d278d98a65e8..053f33095b52bfea9a4612687b67ac3a283aac8a 100755 (executable)
@@ -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) = @_;
index e277ca611641075df2e134a8cae5efa23d730cc5..eac567556b45c5027e1ba1c356440d40789f45f9 100755 (executable)
@@ -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";