Commit 60ef54e3 authored by Leigh Stoller's avatar Leigh Stoller

Small bug fix to prevent nfree errors out of the END block. Need

to revisit this when I have time.
parent 21d50bba
#!/usr/bin/perl -w
#
# Copyright (c) 2005-2016 University of Utah and the Flux Group.
# Copyright (c) 2005-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -201,6 +201,7 @@ sub current_v2pmap($) { return $_[0]->{'CURRENT_V2PMAP'}; }
sub pnodes($) { return $_[0]->{'PNODES'}; }
sub fixednodes($) { return $_[0]->{'FIXEDNODES'}; }
sub newreserved($) { return $_[0]->{'NEWRESERVED'}; }
sub clearnewreserved($) { $_[0]->{'NEWRESERVED'} = {}; }
sub rspec($) { return $_[0]->{'RSPEC'}; }
sub genirspec($) { return $_[0]->{'GENIRSPEC'}; }
sub forcedarchitecture($){ return $_[0]->{'FORCEARCH'}; }
......
......@@ -201,6 +201,7 @@ sub current_v2pmap($) { return $_[0]->{'CURRENT_V2PMAP'}; }
sub pnodes($) { return $_[0]->{'PNODES'}; }
sub fixednodes($) { return $_[0]->{'FIXEDNODES'}; }
sub newreserved($) { return $_[0]->{'NEWRESERVED'}; }
sub clearnewreserved($) { $_[0]->{'NEWRESERVED'} = {}; }
sub rspec($) { return $_[0]->{'RSPEC'}; }
sub genirspec($) { return $_[0]->{'GENIRSPEC'}; }
sub forcedarchitecture($){ return $_[0]->{'FORCEARCH'}; }
......
......@@ -413,6 +413,8 @@ if (IsMultiPCArchitecture()) {
if ($vtop->newreservednodes()) {
my @newreservednodes = $vtop->newreservednodes();
if (system("$NFREE -x $pid $eid @newreservednodes")) {
# Clear this so that we do not try again in fatal();
$vtop->clearnewreserved();
fatal("Could not release new nodes after $architecture");
}
# Kill this, we are done with it now that nodes are released
......
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