Commit 7b1bfd6e authored by Leigh B Stoller's avatar Leigh B Stoller

Fixes to previous changes to log/backup file saving.

parent e8939702
......@@ -2841,8 +2841,6 @@ sub CleanLogFiles($)
}
mysystem("/bin/rm -f @delete") == 0
or return -1;
mysystem("/bin/rm -rf ${workdir}/vstate* ${workdir}/pstate*") == 0
or return -1;
return 0;
}
......
......@@ -804,6 +804,9 @@ sub GetTicketAuxAux($$$$$$$$$)
my %external_vportmap = ();
my %stitching_paths = ();
# Always do this to avoid buildup.
$slice_experiment->ClearBackupState();
#
# If this is a ticket update, we want to seed the namemap with
# existing nodes. This is cause the rspec might refer to wildcards
......@@ -811,7 +814,6 @@ sub GetTicketAuxAux($$$$$$$$$)
# what nodes are currently reserved in case we have to release some.
#
if ($isupdate) {
$slice_experiment->ClearBackupState();
if ($slice_experiment->BackupVirtualState()) {
print STDERR "Could not backup virtual state!\n";
$response = GeniResponse->Create(GENIRESPONSE_ERROR);
......@@ -3770,6 +3772,11 @@ sub SliverWorkAux($$$$$$$)
$ticket->Redeem()
if (defined($ticket));
$slice->UnLock();
# Update this info now that we are done.
$experiment->SaveExperimentState();
$experiment->SaveLogFiles();
return GeniResponse->Create(GENIRESPONSE_SUCCESS,
[$sliver_credential->asString(),
$manifest_string]);
......@@ -3789,6 +3796,11 @@ sub SliverWorkAux($$$$$$$)
if (defined($ticket));
$aggregate->SetRegistered(0);
$slice->UnLock();
# Update this info now that we are done.
$experiment->SaveExperimentState();
$experiment->SaveLogFiles();
if ($v2) {
return GeniResponse->Create(GENIRESPONSE_SUCCESS,
[$sliver_credential->asString(),
......
......@@ -1252,7 +1252,6 @@ elsif ($inout eq "modify") {
}
}
$experiment->ClearBackupState();
$experiment->Report($repfile, "-b");
}
else { # $inout eq "restart" assumed.
......@@ -1269,6 +1268,11 @@ if (defined($logname)) {
system("cp -fp $logname $workdir/" . EXPTLOGNAME());
}
#
# Remove stuff we no longer need.
#
$experiment->ClearBackupState();
#
# Save the final experiment state so that we get a running record of
# the state on disk, for post-mortem debugging. This will get copied
......
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