Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
0d342aa2
Commit
0d342aa2
authored
Jan 03, 2013
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Watch for errors from RecordVlan Insertion/Modification.
parent
a1ab09d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
tbsetup/snmpit_test/snmpit_test.in
tbsetup/snmpit_test/snmpit_test.in
+24
-6
No files found.
tbsetup/snmpit_test/snmpit_test.in
View file @
0d342aa2
...
...
@@ -1722,14 +1722,20 @@ sub doRestorePortStatus($@) {
print
"
Could not yank
$port
from
$source_vlan
\n
";
$errors
++
;
}
VLan
->
RecordVlanInsertion
(
$source_vlan
->
id
(),
$stack
->
{
STACKID
});
if
(
VLan
->
RecordVlanInsertion
(
$source_vlan
->
id
(),
$stack
->
{
STACKID
})){
print
"
Could not record vlan insertion for
$source_vlan
\n
";
$errors
++
;
}
}
if
(
defined
(
$target_vlan
)
&&
$target_vlan
->
KeepInSync
())
{
if
(
$target_vlan
->
AddPort
(
$port
))
{
print
"
Could not add
$port
to
$target_vlan
\n
";
$errors
++
;
}
VLan
->
RecordVlanInsertion
(
$target_vlan
->
id
(),
$stack
->
{
STACKID
});
if
(
VLan
->
RecordVlanInsertion
(
$target_vlan
->
id
(),
$stack
->
{
STACKID
})){
print
"
Could not record vlan insertion for
$target_vlan
\n
";
$errors
++
;
}
}
# Enable or disable the port
...
...
@@ -2068,7 +2074,10 @@ sub CreateOneVlan($$$@)
# Record an insertion to make sure the DB reflects the current state
# of the vlan.
#
VLan
->
RecordVlanInsertion
(
$vlanid
,
$stack
->
{
STACKID
});
if
(
VLan
->
RecordVlanInsertion
(
$vlanid
,
$stack
->
{
STACKID
}))
{
print
STDERR
"
Could not record vlan insertion for
$vlanid
\n
";
$errors
++
;
}
#
# Set the speed and duplex of each interface depending on the
...
...
@@ -3122,7 +3131,10 @@ sub doSyncVlansWithDB($) {
$errors
++
;
}
}
VLan
->
RecordVlanInsertion
(
$vlan
->
id
(),
$stackid
);
if
(
VLan
->
RecordVlanInsertion
(
$vlan
->
id
(),
$stackid
))
{
print
"
Could not record vlan insertion for
$vlan
\n
";
$errors
++
;
}
}
}
}
...
...
@@ -3396,7 +3408,10 @@ sub doMakeVlan($$@) {
# since we need to compute the path each time we sync it (-X).
setSwitchTrunkPath
(
$source_vlan
)
if
(
!
$source_vlan
->
IsShared
());
VLan
->
RecordVlanInsertion
(
$source_vlan
,
$stack
->
{
STACKID
});
if
(
VLan
->
RecordVlanInsertion
(
$source_vlan
,
$stack
->
{
STACKID
}))
{
print
"
Could not record vlan insertion for
$source_vlan
\n
";
$errors
++
;
}
}
if
(
defined
(
$target_vlan
)
&&
$target_vlan
->
KeepInSync
())
{
# Have to do this cause we cleared it above
...
...
@@ -3410,7 +3425,10 @@ sub doMakeVlan($$@) {
# since we need to compute the path each time we sync it (-X).
setSwitchTrunkPath
(
$target_vlan
)
if
(
!
$target_vlan
->
IsShared
());
VLan
->
RecordVlanInsertion
(
$target_vlan
,
$stack
->
{
STACKID
});
if
(
VLan
->
RecordVlanInsertion
(
$target_vlan
,
$stack
->
{
STACKID
}))
{
print
"
Could not record vlan insertion for
$target_vlan
\n
";
$errors
++
;
}
}
}
return
$errors
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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