Including changes to mnexec -c to reduce the number of
close() system calls, which may help with performance in
containers on Ubuntu 22.04.
Note that systemd-udevd also seems to be a cause of performance issues
and should probably be disabled while running Mininet.
Adding dbeug logging to test_simpleperf because it is failing
intermittently. (Note with packet loss it can fail, but this
is not how we should be testing it.)
We defer cfs cgroup bandwidth limiting until
CPULimitedHost.configDefault(), and we change
Mininet.stop() to call a new host.unlimit()
method if available.
Support for Ubuntu 22.04 and 20.04.
- Update Mininet version
- Install pexpect with pip to support python 3 and 2
- Update code-check workflow
- refactor to enable testing python 2 on ubuntu 22.04
- update to actions/checkout@v3 (@v2 is deprecated)
errata:
mountCgroups has not actually been renamed, but has been
changed to use cgroupfs-mount and to return the cgroups version.
util.py: replace mountCgroups with checkCgroups, which
returns the cgroup version (cgroup, cgroup2)
node.py: handle cpu.max='quota period' for cgroup2
vs. cpu.{cfs_quota_us,cfs_period_us} for cgroup
net.py: make _iperfVals more robust in the case of a missing
UDP ACK
examples/cpu.py: user _iperfVals to handle new iperf behavior
of no output from telnet
+ identify client and server (different on Ubuntu 20 vs. 22)
+ add util.{unitScale,fmtBps} to help with output format
- internal function _parseIperfOutput has been removed
1. update/fix codecheck
Run workflow with pylint 2.15.7
Add a bunch of fiddly and mostly cosmetic changes to
make pylint (and make codecheck) happy.
Also try to run pyflakes3 vs. pyflakes
2. remove Ubuntu 18.04
Ubuntu 18.04 has been removed from github actions, so
we remove it from our workflow as well
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.
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 ;-(
Looking at trying to minimize code changes for Python 3.
For now we are keeping byte str() in py2 and unicode str()
in py3. It's a pain to rewrite all string code to usee
u'' for py2 compatibility. However we may need to revisit
this for pexpect().
Created compatibility wrappers in util.py:
BaseString (replacement for basestring)
decode() (optionally decode utf-8 for py3)
encode() (optionally encode utf-8 for py3)
Also we've switched from the .iter*() flavors to their
static alternatives for py2 (note they are iterators in py3!)
Changed util.errRun and clean.sh to call decode()
This makes the mid-level net.add*() API symmetric.
You can now delete hosts, switches, controllers and links using
a new net.del*() API, as well as del net[ 'nodename' ].
This is more complicated than it should be. We are also relying on
the fact that waitOutput should eat extra prompts most of the time.
Still not perfect - it's hard to get this exactly right, and we
should try to make it easier!
Fixes#589