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>
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 "$_ ?";
}
our ($plan);
-my $fn= "data-plan.pl";
+my $fn= "data-$walker.pl";
sub allocations ($$) {
my ($init, $each) = @_;
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;
}
}
-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";