Skip to content
Snippets Groups Projects
Commit 574d634f authored by Bob Lantz's avatar Bob Lantz
Browse files

Don't clean up links that may have been dumped into root NS.

This should rarely happen - in the usual case, either the
links will be shut down by Mininet.stop(), or the interfaces
will be deleted by node.stop( deleteIntfs=True ), or the
links or interfaces will be explicitly deleted or stopped
using the low-level API.

Cases that are relying on links being automatically deleted
in cleanup() will potentially find that they are now no longer
deleted, but these cases should be rare.
parent eafbd2a5
No related branches found
No related tags found
No related merge requests found
......@@ -197,9 +197,10 @@ def config( self, mac=None, ip=None, ifconfig=None,
def delete( self ):
"Delete interface"
self.cmd( 'ip link del ' + self.name )
if self.node.inNamespace:
# Link may have been dumped into root NS
quietRun( 'ip link del ' + self.name )
# We used to do this, but it slows us down:
# if self.node.inNamespace:
# Link may have been dumped into root NS
# quietRun( 'ip link del ' + self.name )
def status( self ):
"Return intf status as a string"
......
......@@ -194,10 +194,11 @@ def _popen( self, cmd, **params ):
def cleanup( self ):
"Help python collect its garbage."
# We used to do this, but it slows us down:
# Intfs may end up in root NS
for intfName in self.intfNames():
if self.name in intfName:
quietRun( 'ip link del ' + intfName )
# for intfName in self.intfNames():
# if self.name in intfName:
# quietRun( 'ip link del ' + intfName )
self.shell = None
# Subshell I/O, commands and control
......@@ -1311,10 +1312,6 @@ def stop( self, *args, **kwargs ):
super( OVSBatch, self ).stop( *args, **kwargs )
self.started = False
def cleanup( self):
"Don't bother to clean up"
return
class IVSSwitch( Switch ):
"Indigo Virtual Switch"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment