8000 Mininet.delController() raises TypeError when removing RemoteController · Issue #1254 · mininet/mininet · GitHub
[go: up one dir, main page]

Skip to content

Mininet.delController() raises TypeError when removing RemoteController #1254

Open

Description

@akash4-sys

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0