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
a89ccb78
Commit
a89ccb78
authored
10 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Fix problem of ssh'ing into "localhost" on a remote node.
parent
2013b7ae
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
examples/cluster.py
+8
-1
8 additions, 1 deletion
examples/cluster.py
with
8 additions
and
1 deletion
examples/cluster.py
+
8
−
1
View file @
a89ccb78
...
...
@@ -340,6 +340,13 @@ def moveIntf( intf, node, printError=True ):
def
makeTunnel
(
self
,
node1
,
node2
,
intfname1
,
intfname2
,
addr1
=
None
,
addr2
=
None
):
"
Make a tunnel across switches on different servers
"
# We should never try to create a tunnel to ourselves!
assert
node1
.
server
!=
'
localhost
'
or
node2
.
server
!=
'
localhost
'
# And we can't ssh into this server remotely as 'localhost',
# so try again swappping node1 and node2
if
node2
.
server
==
'
localhost
'
:
return
self
.
makeTunnel
(
node2
,
node1
,
intfname2
,
intfname1
,
addr2
,
addr1
)
# 1. Create tap interfaces
for
node
in
node1
,
node2
:
# For now we are hard-wiring tap9, which we will rename
...
...
@@ -665,7 +672,7 @@ def placeNodes( self ):
switches
=
self
.
topo
.
switches
(),
links
=
self
.
topo
.
links
()
)
for
node
in
nodes
:
config
=
self
.
topo
.
node
_i
nfo
[
node
]
config
=
self
.
topo
.
node
I
nfo
(
node
)
# keep local server name consistent accross nodes
if
'
server
'
in
config
.
keys
()
and
config
[
'
server
'
]
==
None
:
config
[
'
server
'
]
=
'
localhost
'
...
...
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