Commit 8b49625f authored by Leigh B Stoller's avatar Leigh B Stoller

Debugging to catch vlan errors in syncVlansFromTables().

parent fee5763b
#!/usr/bin/perl -wT
#
# Copyright (c) 2007-2012 University of Utah and the Flux Group.
# Copyright (c) 2007-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -3457,6 +3457,7 @@ sub RecordVLanModification($$$$)
if (defined($current) && $current ne "") {
%current = map { $_ => $_ } split(/\s+/, $current);
}
print "RecordVLanModification: $vlan - " . join(" ", keys(%current)) . "\n";
if ($added) {
foreach my $port (@$added) {
......@@ -3476,6 +3477,8 @@ sub RecordVLanModification($$$$)
}
my $members = join(" ", keys(%current));
print "RecordVLanModification (after): $vlan - $members\n";
DBQueryWarn("update vlans set members='$members' ".
"where id='$lanid'")
or return -1;
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LGPL
#
......@@ -2431,7 +2431,10 @@ sub syncVlansFromTables($$@) {
# ports does not get confused.
#
my @tmp = Port->toIfaceStrings(@staleports, @staletrunks);
VLan->RecordVLanModification($vlanid, undef, \@tmp);
if (VLan->RecordVLanModification($vlanid, undef, \@tmp)) {
print STDERR "Could not record vlan modification: $vlanid - @tmp\n";
goto bad;
}
}
#
......
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