Skip to content

Mininet 2.3.0#1

Open
etzngr wants to merge 52 commits intograingert:masterfrom
etzngr:mininet-2.3.0
Open

Mininet 2.3.0#1
etzngr wants to merge 52 commits intograingert:masterfrom
etzngr:mininet-2.3.0

Conversation

@etzngr
Copy link

@etzngr etzngr commented Jun 29, 2022

Update the mininet PyPI package to the latest release 2.3.0

lantz and others added 30 commits December 13, 2020 17:15
Initial support for github actions CI builds
* Install correctly on Ubuntu 20.04

Main changes are to avoid pulling in python2 by mistake, and then to make sure to install only python3 packages.

Also: Add net-tools which is needed to get ifconfig on newer Ubuntu releases.

(admin note: there are still a couple of remaining 20.04 issues but this is helpful)
Ubuntu 20.04 fixes:
- fixes sshd test
- speeds up examples/{treeping64,tree1024}.py
- debugging hacks/output for testLinkChange
- removes cfs from examples/popen.py
- improves nat in nodelib (netplan fixes?)
- makes some tests executable
- waits for switches to connect in tests to
  avoid race conditions
-- adds mn -w option and wait CLI command
Changes:
- REMOVES default "-v" argument for Controller()
  and adds verbose(=False) option; avoiding logging
  makes it faster
- CHANGES waitConnected to wait for 5 seconds
  as documented; we may wish to implement an argument
  to -w to set this timeout
Issues?
- There may still be an issue with the ovs-netplan-clean
  service causing the boot to hang ;-(
* 2.3.0a1

* intfoptions and test_intfoptions tweaks

also added cleanup() to test_walkthrough fixture
Adjusting the tolerance for this test to compensate
for apparent performance variation when running as
part of github actions CI builds/tests.
also remove unneeded rm -f pexpect.out since we are not
generating that at the moment
In certain cases, dp0 and its interfaces were not
being cleaned up, probably due to scratchnet.py being
killed before it terminated. This in turn caused the
natnet test to fail.
test_controlnet: log to stdout for now
test_walkthrough: wait for http server connection
Should be able to build 16.04, 18.04 and 20.04,
as well as branch builds.
Thanks to travis.org for the CI support for many years.
Sometimes we got no output with python 3 on ubuntu 20
This simplifies setLogLevel slightly and should work
on python 2 and python 3.
- call getLogger( "mininet" ) to set lg properly
- support warning() as well as (deprecated) warn()
- rearrange initialization slightly
thanks to Vintas Avinash
closes mininet#1011
Also tweak README.md, INSTALL, and CONTRIBUTORS
lantz added 22 commits January 29, 2021 22:39
This means that 'mn' will run be default in python3.

For python2, run

    sudo python2 `which mn`

Also:

- change mn execution line to /usr/bin/python
  (install seems to change it to python2 or python3)

- don't install python-is-python3 package
+ text file updates
This helps with virtualenv although it can open
up another security hole if you end up using an
unexpected python interpreter.

Overall it seems to make sense to err on the side
of usability but it's good to be aware of security.

However, for the remaining utility scripts that require
python 2, we explicitly note this with #!/usr/bin/python2.
* rc.local: /usr/bin/bash -> /bin/bash

bash is (and should be) located in /bin

this may have caused ubuntu 18.04 to not execute
/etc/rc.local and regenerate ssh keys

* fix bootAndRun()
- avoid deleting from collection we're iterating over
- fix variable name misspelling
* Force reinstall on 'make install'

This allows you to install a modified version with 'make install'.

* Simplify RyuController and update for current Ryu

Notes:

The Ryu() constructor has changed slightly. We still add
`--ofp-tcp-listen-port %s` to the end of `cargs` to make
Controller() happy.

`command` is now `ryu run` so it includes the `run` command
but can be specified explicitly as needed.

You should be able to run Ryu's simple_switch by using:

    mn --controller ryu

and pass alternate modules such as simple_switch_13:

    mn --controller ryu,ryu.app.simple_switch_13

Unfortunately simple_switch_stp seems like it may be broken
for Python 3.8, which is too bad because we'd like to test
the Torus topo with it.
write_history seems to raise a spurious IOError,
so we catch it.
- use decode() for python 3 compatibility
- try to identify non-loopback interface for controllers
-- avoid hardwired 'eth0'
- use remoteServer consistently in tests
- pass tests on ubuntu 20/python 3
- pass hybrid test with hybrid python 2 and python 3 mininet
Background: In Mininet 2.2, waitConnected() waits forever
by default. We are going to preserve this behavior for 2.3.

Therefore, the --wait/-w option will wait forever. This is used
in the tests to make sure that all switches have connected to
their controllers.

A new --twait/-t <int> option has been added for timed waits.

The API for Mininet(....waitConnected=False/True) is preserved,
but you can now pass in an integer wait time. False means
do not wait at all. True means wait forever. I have elected
for now to preserve None also meaning wait forever as it was
in 2.2, but note that you should probably use the boolean
True/False instead.
This avoids hanging in scripts if pip uninstall decides
to ask for confirmation
- pass timeout correctly to waitConnected()
- handle surprising behavior that 1 == True in Python
- mn --test none does not call waitConnected()
- 2.3.0rc2 -> 2.3.0
- update copyright date in LICENSE
@etzngr
Copy link
Author

etzngr commented Aug 2, 2022

@graingert Could you please update the PyPI package?

@graingert
Copy link
Owner

@graingert Could you please update the PyPI package?

Thanks for the ping! Do you need to be able to push to the pypi project yourself?

@etzngr
Copy link
Author

etzngr commented Aug 3, 2022

Thanks for the ping! Do you need to be able to push to the pypi project yourself?

Thanks for the quick reply! No, I don't need to be able to push, just the update to the latest mininet release on PyPI.

@etzngr
Copy link
Author

etzngr commented Aug 24, 2022

@graingert Any news on the PyPI update?

@graingert
Copy link
Owner

I don't have time to maintain this, but I'm happy to copy in a pypi token to GitHub if you find someone to configure automatic releases

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

Successfully merging this pull request may close these issues.

5 participants

Comments