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

Unable to run basic example due to cgroup conflict with docker #266

Open
raonsv opened this issue Dec 20, 2023 · 1 comment
Open

Unable to run basic example due to cgroup conflict with docker #266

raonsv opened this issue Dec 20, 2023 · 1 comment

Comments

@raonsv
Copy link

raonsv commented Dec 20, 2023

I installed bare metal version on ubuntu LTS 22.04 with python3. I was able to run examples without container node. When I tried "sudo python3 containernet_example.py" I get the following error:
docker.errors.APIError: 400 Client Error: Bad Request ("cgroup-parent for systemd chgroup should be a valid slice named as "xxx.slice"")

I checked that docker is in cgroup systemd - docker is installed using your ansible.

I tried to change the cgroup to cgroupfs and restarting docker daemon but cgroup remains systemd.

I would appreciate any help. Did you see this error with others.

Best,
Nagi

@raonsv
Copy link
Author

raonsv commented Dec 21, 2023

It is resolved it by creating file /etc/docker/daemon.json configuration file with the following:
{
"exec-opts": ["native.cgroupdriver=cgroupfs"]
}
After saving it, restarting docker service.
sudo systemctl enable docker
sudo systemclt daemon-reload
sudo systemctl restart docker

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

No branches or pull requests

1 participant