Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
ac65ea3f
Commit
ac65ea3f
authored
15 years ago
by
Brandon Heller
Browse files
Options
Downloads
Patches
Plain Diff
Increase createLink retry count
Was seeing occasional errors with tests run back-to-back.
parent
fcf6a16f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mininet/util.py
+5
-3
5 additions, 3 deletions
mininet/util.py
with
5 additions
and
3 deletions
mininet/util.py
+
5
−
3
View file @
ac65ea3f
...
...
@@ -80,7 +80,7 @@ def move_intf(intf, node):
#lg.info(' output: %s\n' % output)
links
=
node
.
cmd
(
'
ip link show
'
)
if
not
intf
in
links
:
lg
.
error
(
'
*** Error: move_intf: % not successfully moved to %s:
\n
'
%
lg
.
error
(
'
*** Error: move_intf: %
s
not successfully moved to %s:
\n
'
%
(
intf
,
node
.
name
))
return
False
return
True
...
...
@@ -152,6 +152,8 @@ def retry(n, retry_delay, fn, *args):
# delay between interface move checks in seconds
MOVEINTF_DELAY
=
0.0001
CREATE_LINK_RETRIES
=
10
def
createLink
(
node1
,
node2
):
'''
Create a link between nodes, making an interface for each.
...
...
@@ -162,9 +164,9 @@ def createLink(node1, node2):
intf2
=
node2
.
newIntf
()
makeIntfPair
(
intf1
,
intf2
)
if
node1
.
inNamespace
:
retry
(
3
,
MOVEINTF_DELAY
,
moveIntf
,
intf1
,
node1
)
retry
(
CREATE_LINK_RETRIES
,
MOVEINTF_DELAY
,
moveIntf
,
intf1
,
node1
)
if
node2
.
inNamespace
:
retry
(
3
,
MOVEINTF_DELAY
,
moveIntf
,
intf2
,
node2
)
retry
(
CREATE_LINK_RETRIES
,
MOVEINTF_DELAY
,
moveIntf
,
intf2
,
node2
)
node1
.
connection
[
intf1
]
=
(
node2
,
intf2
)
node2
.
connection
[
intf2
]
=
(
node1
,
intf1
)
return
intf1
,
intf2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment