Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e909c6e4f | |||
| 740acfb350 | |||
| a978ce9484 | |||
| 1e546cb73b |
@@ -22,6 +22,11 @@ jobs:
|
||||
# This seems too slow unfortunately:
|
||||
# sudo apt-get upgrade -y -qq
|
||||
PYTHON=${{ matrix.py }} util/install.sh -nv
|
||||
- name: Disable slow udevd
|
||||
run: sudo systemctl stop systemd-udevd
|
||||
systemd-udevd-kernel.socket
|
||||
systemd-udevd-control.socket
|
||||
|| echo "couldn't disable udevd"
|
||||
- name: Sanity test
|
||||
run: |
|
||||
export sudo="sudo env PATH=$PATH"
|
||||
@@ -39,8 +44,8 @@ jobs:
|
||||
export sudo="sudo env PATH=$PATH"
|
||||
export PYTHON=${{ matrix.py }}
|
||||
$sudo $PYTHON mininet/test/runner.py -v
|
||||
- name: Run examples tests (quick)
|
||||
- name: Run examples tests
|
||||
run: |
|
||||
export sudo="sudo env PATH=$PATH"
|
||||
export PYTHON=${{ matrix.py }}
|
||||
$sudo $PYTHON examples/test/runner.py -v -quick
|
||||
$sudo $PYTHON examples/test/runner.py -v
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Mininet Installation/Configuration Notes
|
||||
----------------------------------------
|
||||
|
||||
Mininet 2.3.1b2
|
||||
Mininet 2.3.1b3
|
||||
---
|
||||
|
||||
The supported installation methods for Mininet are 1) using a
|
||||
|
||||
@@ -2,7 +2,7 @@ Mininet: Rapid Prototyping for Software Defined Networks
|
||||
========================================================
|
||||
*The best way to emulate almost any network on your laptop!*
|
||||
|
||||
Mininet 2.3.1b2
|
||||
Mininet 2.3.1b3
|
||||
|
||||
[![Build Status][1]](https://github.com/mininet/mininet/actions)
|
||||
|
||||
@@ -70,7 +70,7 @@ Mininet includes:
|
||||
|
||||
### Python 3 Support
|
||||
|
||||
- Mininet 2.3.1b2 supports Python 3 and Python 2
|
||||
- Mininet 2.3.1b3 supports Python 3 and Python 2
|
||||
|
||||
- You can install both the Python 3 and Python 2 versions of
|
||||
Mininet side by side, but the most recent installation will
|
||||
|
||||
+3
-3
@@ -53,9 +53,9 @@ class Cleanup( object ):
|
||||
|
||||
info( "*** Removing excess controllers/ofprotocols/ofdatapaths/"
|
||||
"pings/noxes\n" )
|
||||
zombies = ( 'controller ofprotocol ofdatapath ping nox_core'
|
||||
'lt-nox_core ovs-openflowd ovs-controller'
|
||||
'ovs-testcontroller udpbwtest mnexec ivs ryu-manager' )
|
||||
zombies = ( 'controller ofprotocol ofdatapath ping nox_core '
|
||||
'lt-nox_core ovs-openflowd ovs-controller '
|
||||
'ovs-testcontroller udpbwtest mnexec ivs ryu-manager ' )
|
||||
# Note: real zombie processes can't actually be killed, since they
|
||||
# are already (un)dead. Then again,
|
||||
# you can't connect to them either, so they're mostly harmless.
|
||||
|
||||
+5
-1
@@ -109,7 +109,7 @@ from mininet.util import ( quietRun, fixLimits, numCores, ensureRoot,
|
||||
from mininet.term import cleanUpScreens, makeTerms
|
||||
|
||||
# Mininet version: should be consistent with README and LICENSE
|
||||
VERSION = "2.3.1b2"
|
||||
VERSION = "2.3.1b3"
|
||||
|
||||
class Mininet( object ):
|
||||
"Network emulation with hosts spawned in network namespaces."
|
||||
@@ -572,6 +572,10 @@ class Mininet( object ):
|
||||
info( controller.name + ' ' )
|
||||
controller.stop()
|
||||
info( '\n' )
|
||||
# Unlimit cfs hosts to speed up shutdown
|
||||
for h in self.hosts:
|
||||
if hasattr( h, 'unlimit' ):
|
||||
h.unlimit()
|
||||
if self.terms:
|
||||
info( '*** Stopping %i terms\n' % len( self.terms ) )
|
||||
self.stopXterms()
|
||||
|
||||
+22
-9
@@ -685,8 +685,21 @@ class CPULimitedHost( Host ):
|
||||
|
||||
"CPU limited host"
|
||||
|
||||
def __init__( self, name, sched='cfs', **kwargs ):
|
||||
Host.__init__( self, name, **kwargs )
|
||||
def __init__( self, name, sched='cfs', **params ):
|
||||
Host.__init__( self, name, **params )
|
||||
# BL: Setting the correct period/quota is tricky, particularly
|
||||
# for RT. RT allows very small quotas, but the overhead
|
||||
# seems to be high. CFS has a mininimum quota of 1 ms, but
|
||||
# still does better with larger period values.
|
||||
self.period_us = params.get( 'period_us', 100000 )
|
||||
self.sched = sched
|
||||
self.cgroupsInited = False
|
||||
self.cgroup, self.rtprio = None, None
|
||||
|
||||
def initCgroups( self ):
|
||||
"Deferred cgroup initialization"
|
||||
if self.cgroupsInited:
|
||||
return
|
||||
# Initialize class if necessary
|
||||
if not CPULimitedHost.inited:
|
||||
CPULimitedHost.init()
|
||||
@@ -696,13 +709,7 @@ class CPULimitedHost( Host ):
|
||||
# We don't add ourselves to a cpuset because you must
|
||||
# specify the cpu and memory placement first
|
||||
errFail( 'cgclassify -g cpu,cpuacct:/%s %s' % ( self.name, self.pid ) )
|
||||
# BL: Setting the correct period/quota is tricky, particularly
|
||||
# for RT. RT allows very small quotas, but the overhead
|
||||
# seems to be high. CFS has a mininimum quota of 1 ms, but
|
||||
# still does better with larger period values.
|
||||
self.period_us = kwargs.get( 'period_us', 100000 )
|
||||
self.sched = sched
|
||||
if sched == 'rt':
|
||||
if self.sched == 'rt':
|
||||
self.checkRtGroupSched()
|
||||
self.rtprio = 20
|
||||
|
||||
@@ -863,6 +870,7 @@ class CPULimitedHost( Host ):
|
||||
cores: (real) core(s) this host can run on
|
||||
params: parameters for Node.config()"""
|
||||
r = Node.config( self, **params )
|
||||
self.initCgroups()
|
||||
# Was considering cpu={'cpu': cpu , 'sched': sched}, but
|
||||
# that seems redundant
|
||||
self.setParam( r, 'setCPUFrac', cpu=cpu )
|
||||
@@ -878,6 +886,11 @@ class CPULimitedHost( Host ):
|
||||
cls.cgversion = mountCgroups()
|
||||
cls.inited = True
|
||||
|
||||
def unlimit( self ):
|
||||
"Unlimit cpu for cfs"
|
||||
if self.sched == 'cfs' and self.params.get( 'cpu', -1 ) != -1:
|
||||
self.setCPUFrac( -1, sched=self.sched )
|
||||
|
||||
|
||||
# Some important things to note:
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user