Open rantidev opened 1 year ago
@rantidev please provide more details about your runtime environment: OS, docker host, version, where you run pumba and target containers, etc. - everything that will help to reproduce the issue.
Please also add commands you are using to run the target container and the pumba container (docker
commands and not curl
)
Hi, Running into the same issue. OS: Linux docker 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux Docker Version: 20.10.23 Docker Compose v2.15.1 Docker compose file:
services:
redis:
image: redis:6-alpine
restart: unless-stopped
Debug output:
root@docker:/home/hyperglass/prometheus# pumba --log-level=debug stress -d 1m redis
DEBU[0000] using names names="[redis]"
DEBU[0000] stress testing all matching containers
DEBU[0000] listing matching containers duration=1m0s labels="[]" limit=0 names="[redis]" pattern= random=false stressors="[--cpu 4 --timeout 60s]"
DEBU[0000] listing containers
DEBU[0000] found container id=f481bc6bd9bc369c9911a9a9f3e3xxxxxxxxx name=/redacted1
DEBU[0000] found container id=21f8d632502e09e459e4d19dfa13cb2ayyyy name=/redacted2
DEBU[0000] found container id=914608923f3e8211cd2d2c7e94e4705b23z name=/redacted3
DEBU[0000] found container id=baf4f8d39ee1d3e82234a5153cd1067a15db name=/redis
DEBU[0000] found container id=d121419b5b43e7dfe8515f47a44d40b8faaa name=/redacted4
DEBU[0000] stress testing container for duration container= baf4f8d39ee1d3e82234a5153cd1067a15db duration=1m0s pull image=true stress-ng image="alexeiled/stress-ng:latest-ubuntu" stressors="[--cpu 4 --timeout 60s]"
INFO[0000] stress testing container dryrun=false duration=1m0s id=baf4f8d39ee1d3e82234a5153cd1067a15db image="alexeiled/stress-ng:latest-ubuntu" name=/redis pull=true stressors="[--cpu 4 --timeout 60s]"
DEBU[0000] executing stress-ng command image="alexeiled/stress-ng:latest-ubuntu" pull=true stressors="[--cpu 4 --timeout 60s]" target=baf4f8d39ee1d3e82234a5153cd1067a15db
DEBU[0000] pulling stress-ng image image="alexeiled/stress-ng:latest-ubuntu"
DEBU[0001] &{Pulling from alexeiled/stress-ng {0 0}}
DEBU[0001] &{Digest: sha256:6c2f6a6997aeb0dc7f7299e556f67cbb7ca1b40398ef32bbeea50b90fc020ae3 {0 0}}
DEBU[0001] &{Status: Image is up to date for alexeiled/stress-ng:latest-ubuntu {0 0}}
DEBU[0001] creating stress-ng container image="alexeiled/stress-ng:latest-ubuntu"
DEBU[0001] stress-ng container created, starting it id=103c4a9221ee57ee59dba0de6ea6aa6fd65bf2f9efdf3ab577892d459c4f7e5d
FATA[0002] error running stress command: error running chaos command: one or more stress test failed: stress-ng failed with error: stress-ng exited with error: /cgroups can't be listed: Cgroup is not mounted
)cgroup controller and pathparsing failed
@toky0 thank you. I will try to reproduce in a similar environment
Any update on this error?
Not yet. I think it's related to Linux distribution you are using and the cgroups package.
Can you try to run it on Ubuntu or Redhat LTS version?
Hello Team ,
I was using pumba to inject cpu stress in docker containers and it was working perfectly fine. curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" \ -d '{"Image": "gaiaadm/pumba","HostConfig": { "Binds": [ "/var/run/docker.sock:/var/run/docker.sock" ] }, "Cmd": ["--log-level=info", "stress" ,"--duration=1m", "re2:^pg_"]}' \ -X POST http://localhost/v1.37/containers/create
However when I use the above command now to stress the docker container getting below error :
docker logs -f 5ffef0aa421354a5c94f375c90da8fcb1fff33355277ad1dbd409429fe77bbae time="2022-12-02T08:31:07Z" level=info msg="stress testing container" dryrun=false duration=1m0s id=e49e026eb5512be937945800216403d185bf2756c9f7e8dcc8ccab21961aaa75 image="alexeiled/stress-ng:latest-ubuntu" name=/pg_container pull=true stressors="[--cpu 4 --timeout 60s]" time="2022-12-02T08:31:11Z" level=fatal msg="error running stress command: error running chaos command: one or more stress test failed: stress-ng failed with error: stress-ng exited with error: \x02\x00\x00\x00\x00\x00\x00/cgroups can't be listed: Cgroup is not mounted\n\x02\x00\x00\x00\x00\x00\x00)cgroup controller and pathparsing failed\n"