Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5799b8f1
Commit
5799b8f1
authored
Jan 19, 2011
by
Leigh B Stoller
Browse files
BUG FIX: fix two instances where vlans were being left behind
(orphaned) by the protogeni code.
parent
bb0d9e3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniAggregate.pm.in
View file @
5799b8f1
...
...
@@ -980,21 +980,19 @@ sub Start($$$)
print STDERR "$NAMEDSETUP failed\n";
return -1;
}
if ($restart) {
my @diff = ();
my @same = ();
my @diff = ();
my @same = ();
if (Lan->CompareVlansWithSwitches($experiment, \@diff, \@same)) {
print STDERR "CompareVlansWithSwitches failed!\n";
if (Lan->CompareVlansWithSwitches($experiment, \@diff, \@same)) {
print STDERR "CompareVlansWithSwitches failed!\n";
return -1;
}
if (@diff) {
system("$SNMPIT -f ". join(" ", map("-o $_", @diff)));
if ($?) {
print STDERR "Failed to remove obsolete VLANs.\n";
return -1;
}
if (@diff) {
system("$SNMPIT -f ". join(" ", map("-o $_", @diff)));
if ($?) {
print STDERR "Failed to remove obsolete VLANs.\n";
return -1;
}
}
}
system("$SNMPIT -q -t $pid $eid");
if ($?) {
...
...
protogeni/lib/GeniCM.pm.in
View file @
5799b8f1
...
...
@@ -4032,6 +4032,7 @@ sub CleanupDeadSlice($;$)
{
my ($slice, $purge) = @_;
require Firewall;
require Lan;
# Default to full purge.
$purge = 1
...
...
@@ -4051,6 +4052,23 @@ sub CleanupDeadSlice($;$)
return -1;
}
#
# Remove any stale vlans.
#
my @stale;
if (VLan->StaleVlanList($experiment, \@stale) != 0) {
print STDERR "Failed to get stale VLANs\n";
return -1;
}
if (@stale) {
print STDERR "Removing stale vlans @stale\n";
system("$SNMPIT -f ". join(" ", map("-o $_", @stale)));
if ($?) {
print STDERR "Failed to remove stale VLANs\n";
return -1;
}
}
#
# A firewalled slice gets special treatment.
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment