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

Update node.py #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mininet/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ def __init__(self, name, dimage=None, dcmd=None, build_params={},
'devices': [],
'cap_add': ['net_admin'], # we need this to allow mininet network setup
'storage_opt': None,
'sysctls': {}
'sysctls': {},
'cgroup_parent': 'system.slice', # use '/docker' If Docker uses the cgroupfs driver
}
defaults.update( kwargs )

Expand Down Expand Up @@ -838,9 +839,9 @@ def __init__(self, name, dimage=None, dcmd=None, build_params={},
cap_add=self.cap_add, # see docker-py docu
sysctls=self.sysctls, # see docker-py docu
storage_opt=self.storage_opt,
# Assuming Docker uses the cgroupfs driver, we set the parent to safely
# access cgroups when modifying resource limits.
cgroup_parent='/docker'
# Assuming Docker uses the systemd driver because Docker uses cgroupv2 not cgroupv1,
# we set the parent to safely access cgroups when modifying resource limits.
cgroup_parent=defaults['cgroup_parent']
)

if kwargs.get("rm", False):
Expand Down
Loading