Commit 660f4265 authored by Mike Hibler's avatar Mike Hibler
Browse files

Merge remote branch 'origin/master'

parents 484d78ff ed49e5ce
......@@ -790,13 +790,14 @@ sub Release($$)
if (!GeniXML::IsLocalNode($ref));
my $resource_id = GeniXML::GetNodeId($ref);
if (!defined($resource_id)) {
my $vnode_id = GeniXML::GetVnodeId($ref);
if (!defined($resource_id) || !defined($vnode_id)) {
print STDERR "No resource id for node in ticket\n";
print GeniXML::Serialize($ref);
return -1;
}
my $node = GeniUtil::LookupNode($resource_id);
my $node = GeniUtil::LookupNode($vnode_id);
next
if (!defined($node));
......
......@@ -528,13 +528,34 @@ sub doSwapout($) {
# Grab our per-experiment switch stack name.
#
my @expswitches = $experiment->SwitchList(1);
my ($perexpstack,$leader,@curswitches) = \
my ($perexpstack,$leader,@curswitches) =
GetPerExperimentSwitchStack($experiment);
my $stackarg = "";
if (defined($perexpstack) && (@expswitches || @curswitches)) {
$stackarg = "-S $perexpstack --skip-supplied";
}
#
# Remove per-experiment switch stacks.
#
# Clean up any reserved VLAN tags in per-experiment switches so that
# underlying logical wires can be deleted!
#
if ($type != MODIFY && defined($perexpstack)) {
# Kill tag reservations on actual swapout.
TBDebugTimeStamp("snmpit started");
print STDERR "Removing per-experiment VLANs.\n";
if (system("snmpit -S $perexpstack --redirect-err -r $pid $eid")) {
tbwarn "Failed to remove per-experiment VLANs";
}
TBDebugTimeStamp("snmpit finished");
}
if ($type >= RETRY && defined($perexpstack)) {
print STDERR "Removing per-experiment switch stack.\n";
DeletePerExperimentSwitchStack($experiment);
$stackarg = "";
}
#
# Clean up any VLANs in experiment.
#
......@@ -579,15 +600,6 @@ sub doSwapout($) {
}
}
}
#
# Remove per-experiment switch stacks -- don't bother to check if there
# are any; it's cheap.
#
if ($type >= RETRY && defined($perexpstack)) {
print STDERR "Removing per-experiment switch stack.\n";
DeletePerExperimentSwitchStack($experiment);
}
}
if ($type >= MODIFY) {
......@@ -981,7 +993,7 @@ sub doSwapin($) {
# Still haven't done any vlan synch for modify.
#
my @expswitches = $experiment->SwitchList(1);
my ($perexpstack,$leader,@curswitches) = \
my ($perexpstack,$leader,@curswitches) =
GetPerExperimentSwitchStack($experiment);
my $stackarg = "";
if (($type > MODIFY && @expswitches)
......
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