Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: warn when net.start() is not called #1140

Open
GimmickNG opened this issue Jun 25, 2022 · 0 comments
Open

Feature request: warn when net.start() is not called #1140

GimmickNG opened this issue Jun 25, 2022 · 0 comments

Comments

@GimmickNG
Copy link

Expected/Desired Behavior:

Calling methods on a Mininet instance (e.g. ping, pingAll, etc.) should result in a warning or an error if the net has not been started.

Actual Behavior:

Commands e.g. ping silently fail when Mininet instance is not started

Detailed Steps to Reproduce the Behavior:

from mininet.topo import MinimalTopo
from mininet.net import Mininet
from mininet.cli import CLI

topo = MinimalTopo()
net = Mininet(topo)
# net.start()
net.pingAll()
CLI(net)

The pingAll() gets stuck on h1 when net.start() is not called. If the line is removed and the ping command is tried through the CLI, the same thing happens.

Additional Information:

This is one of those obvious errors where people are supposed to start the network before running it, but it's also a very simple QoL fix that can save a lot of time if this error does occur. I ran into this issue and spent a few days trying to fix my topology rather than my initialization script because I didn't realize I had accidentally removed the net.start() when refactoring my code. A message like "Warning: Mininet instance has not been initialized. Did you call start()?" or an error would have saved a lot of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant