Commit 77064c9e authored by Leigh B Stoller's avatar Leigh B Stoller

In tracking down another problem, I noticed that schedterminate is not

always updating the local slice expiration (for the apt daemon).
Also fix a problem with lockdown. But neither of these is what I was
looking for.
parent 4de41a6b
...@@ -3560,6 +3560,9 @@ sub DoSchedTerminate() ...@@ -3560,6 +3560,9 @@ sub DoSchedTerminate()
goto bad; goto bad;
} }
} }
else {
$slice->SetExpiration(time() + ($days * 3600 * 24));
}
# Now we can clear this. # Now we can clear this.
if ($instance->admin_lockdown()) { if ($instance->admin_lockdown()) {
if (DoLockdownInternal("clear", "all")) { if (DoLockdownInternal("clear", "all")) {
...@@ -3568,10 +3571,10 @@ sub DoSchedTerminate() ...@@ -3568,10 +3571,10 @@ sub DoSchedTerminate()
"Failed to clear lock down $instance\n". "Failed to clear lock down $instance\n".
$instance->webURL() . "\n", $instance->webURL() . "\n",
$TBOPS); $TBOPS);
$errmsg = "Failed to clear lockdown";
$errcode = -1;
goto bad;
} }
$errmsg = "Failed to clear lockdown";
$errcode = -1;
goto bad;
} }
my $expires = POSIX::strftime("20%y-%m-%d %H:%M:%S %Z", my $expires = POSIX::strftime("20%y-%m-%d %H:%M:%S %Z",
localtime(str2time($slice->expires()))); localtime(str2time($slice->expires())));
......
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