All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 23bce373 authored by Jonathon Duerig's avatar Jonathon Duerig

Prevent errors in remaining_bandwidth accounting in some cases.

parent 5b665f58
......@@ -2337,6 +2337,7 @@ sub SliverWorkAux($$$$$$$)
{
my ($credential, $object, $keys, $isupdate, $impotent, $v2, $level) = @_;
my $didfwsetup = 0;
my $shouldrollback = 0;
my $restorephys = 0; # Flag to restore physical state
my $response;
my $ticket;
......@@ -2845,6 +2846,7 @@ sub SliverWorkAux($$$$$$$)
$experiment->SaveLogFiles();
goto bad;
}
$shouldrollback = 1;
# Dump the output to STDERR for debugging.
print STDERR $output;
......@@ -3553,7 +3555,8 @@ sub SliverWorkAux($$$$$$$)
# Restore old physical state.
#
if ($restorephys) {
if ($experiment->ReserveSharedBandwidth(1, 1) ||
if (($shouldrollback &&
$experiment->ReserveSharedBandwidth(1, 1)) ||
$experiment->RemovePhysicalState(1) ||
$experiment->RestorePhysicalState()) {
print STDERR "Could not restore backup state for $pid,$eid\n";
......
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