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.)
mnexec -c attempts to close all open files except for
standard in/out/error.
Previously we just closed every fd>2, but this seems to take
a long time on docker. So now we read /proc/self/fd to see which
file descriptors are actually in use.
We defer cfs cgroup bandwidth limiting until
CPULimitedHost.configDefault(), and we change
Mininet.stop() to call a new host.unlimit()
method if available.
systemd-udevd appears to drastically increase
Mininet startup time.
With systemd-udevd disabled,
mn --topo single,100 --test none
takes 8s rather than 40s (31s with NM_UNMANAGED) on
my test VM.
We need a way of disabling it globally and always for
Mininet interfaces, but this is a start for github
actions at least.
For now, we execute this command before running the CI tests:
systemctl stop systemd-udevd systemd-udevd-kernel.socket \
systemd-udevd-control.socket
We also restore the "slow" examples tests, including
test_tree1024.
The list is specified as a string, but when it was
split across lines spaces were not properly added.
Probably it should actually be a list to make it more
robust to adding additional process names.
For now we are adding spaces to all of the lines, so
hopefully anyone who updates it will follow the pattern.
This should fix the problem of ovs-testcontroller processes
not being killed.
Thanks to Rwitick Ghosh.
Closes#1164
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
Approved by the copyright holders.
The historical "OpenFlow" license was adopted for harmony
with the OpenFlow project and associated software. Mininet
has always been BSD-licensed, but we're adopting the standard
license text that is recommended/approved by OSI and
automatically recognized by github.
GitHub seems to have pulled the plug on 16.04 VMs for
Actions, and this is breaking our integration.
Ideally we should come up with another test method
for 16.04 (notably the 16.04 kernel) as well as
other distros that Actions doesn't support
directly such as Debian.
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.
- 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