Commit d6fafc70 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

More little changes for mapper regression mode so that

physical state compares properly.
parent 8f88d46f
...@@ -3094,9 +3094,9 @@ sub RemovePhysicalState($) ...@@ -3094,9 +3094,9 @@ sub RemovePhysicalState($)
} }
return $errors; return $errors;
} }
sub BackupPhysicalState($;$) sub BackupPhysicalState($;$$)
{ {
my ($self, $directory) = @_; my ($self, $directory, $regression) = @_;
# Must be a real reference. # Must be a real reference.
return -1 return -1
...@@ -3106,6 +3106,7 @@ sub BackupPhysicalState($;$) ...@@ -3106,6 +3106,7 @@ sub BackupPhysicalState($;$)
my $eid = $self->eid(); my $eid = $self->eid();
my $pstateDir = (defined($directory) ? my $pstateDir = (defined($directory) ?
$directory : $self->WorkDir() . "/pstate"); $directory : $self->WorkDir() . "/pstate");
my $physonly = (defined($regression) ? undef : 1);
my $errors = 0; my $errors = 0;
if (! -e $pstateDir) { if (! -e $pstateDir) {
...@@ -3119,7 +3120,7 @@ sub BackupPhysicalState($;$) ...@@ -3119,7 +3120,7 @@ sub BackupPhysicalState($;$)
return -1 return -1
if (Lan->BackupExperimentLans($self, $pstateDir) != 0); if (Lan->BackupExperimentLans($self, $pstateDir) != 0);
my @pnodenames = ExpNodes($pid, $eid, 0, 1); my @pnodenames = ExpNodes($pid, $eid, 0, $physonly);
if (@pnodenames) { if (@pnodenames) {
my $clause = join(" or ", map("node_id='$_'", @pnodenames)); my $clause = join(" or ", map("node_id='$_'", @pnodenames));
......
...@@ -1391,6 +1391,8 @@ sub CreateVnodes($$) ...@@ -1391,6 +1391,8 @@ sub CreateVnodes($$)
my $debug = defined($options->{'debug'}) && $options->{'debug'}; my $debug = defined($options->{'debug'}) && $options->{'debug'};
my $impotent= defined($options->{'impotent'}) && $options->{'impotent'}; my $impotent= defined($options->{'impotent'}) && $options->{'impotent'};
my $verbose = defined($options->{'verbose'}) && $options->{'verbose'}; my $verbose = defined($options->{'verbose'}) && $options->{'verbose'};
my $regression = defined($options->{'regression'}) &&
$options->{'regression'};
my $pid = $options->{'pid'}; my $pid = $options->{'pid'};
my $eid = $options->{'eid'}; my $eid = $options->{'eid'};
my $count = $options->{'count'}; my $count = $options->{'count'};
...@@ -1570,7 +1572,14 @@ sub CreateVnodes($$) ...@@ -1570,7 +1572,14 @@ sub CreateVnodes($$)
} }
my $jailip = "${IPBASE1}.${pnet}.${pnode2}.${i}"; my $jailip = "${IPBASE1}.${pnet}.${pnode2}.${i}";
my $uuid = (@uuids ? shift(@uuids) : NewUUID()); # Need to keep the UUIDs consistent across regression mode.
my $uuid;
if ($regression) {
$uuid = "${pnode2}${i}-1111-2222-3333-44444444";
}
else {
$uuid = (@uuids ? shift(@uuids) : NewUUID());
}
if (!defined($uuid)) { if (!defined($uuid)) {
print STDERR "Could not generate a UUID!\n"; print STDERR "Could not generate a UUID!\n";
goto bad; goto bad;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment