Mininet.delController() fails when removing a RemoteController
Bug description
Calling Mininet.delController() with a RemoteController instance results in a TypeError.
The error occurs because delController() internally calls delNode(), which invokes node.stop(deleteIntfs=True). However, RemoteController.stop() does not accept the deleteIntfs argument.
Minimal reproduction
from mininet.net import Mininet
from mininet.node import RemoteController
net = Mininet(controller=RemoteController)
c0 = net.addController(
name='c0',
controller=RemoteController,
ip='127.0.0.1',
port=6653
)
net.delController(c0)
Expected behavior
Mininet.delController() should either successfully remove a RemoteController instance or clearly indicate that removing remote controllers is unsupported.
Actual behavior
The following exception is raised:
TypeError: RemoteController.stop() got an unexpected keyword argument 'deleteIntfs'
Relevant code path
mininet/net.py:
def delController(self, controller):
self.delNode(controller)
delNode():
node.stop(deleteIntfs=True)
RemoteController.stop() does not accept the deleteIntfs argument.
Environment
- Mininet version: 2.3.0
- OS: Ubuntu 24.04.4 LTS
- Python version: Not Python-version specific (tested with 3.12.3)
- Installation method: Installed using apt (
sudo apt install mininet)
Additional context
RemoteController instances can be created through addController() and are stored in Mininet.controllers. However, calling delController() on such an instance currently results in a TypeError because the cleanup path passes deleteIntfs=True to RemoteController.stop().
Traceback
Traceback (most recent call last):
File "/home/akash4-sys/Desktop/Project/fuzzer/sample.py", line 13, in <module>
net.delController(c0)
File "/usr/lib/python3/dist-packages/mininet/net.py", line 302, in delController
self.delNode( controller )
File "/usr/lib/python3/dist-packages/mininet/net.py", line 246, in delNode
node.stop( deleteIntfs=True )
TypeError: RemoteController.stop() got an unexpected keyword argument 'deleteIntfs'
Mininet.delController()fails when removing aRemoteControllerBug description
Calling
Mininet.delController()with aRemoteControllerinstance results in aTypeError.The error occurs because
delController()internally callsdelNode(), which invokesnode.stop(deleteIntfs=True). However,RemoteController.stop()does not accept thedeleteIntfsargument.Minimal reproduction
Expected behavior
Mininet.delController()should either successfully remove aRemoteControllerinstance or clearly indicate that removing remote controllers is unsupported.Actual behavior
The following exception is raised:
Relevant code path
mininet/net.py:delNode():RemoteController.stop()does not accept thedeleteIntfsargument.Environment
sudo apt install mininet)Additional context
RemoteControllerinstances can be created throughaddController()and are stored inMininet.controllers. However, callingdelController()on such an instance currently results in aTypeErrorbecause the cleanup path passesdeleteIntfs=TruetoRemoteController.stop().Traceback