Commit ed49e5ce authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 48b717ed 8fbe1ab3
......@@ -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