alexei-led / pumba

Chaos testing, network emulation, and stress testing tool for containers
Apache License 2.0
2.79k stars 195 forks source link

Remove tc container after usage #164

Open jonastheis opened 4 years ago

jonastheis commented 4 years ago

Problem

When using Pumba with an external tc-image then the spawned containers are not removed which leaves behind a plethora of created/exited containers.

image

Specifically, I'm using the following command

docker run -it --rm  -v /var/run/docker.sock:/var/run/docker.sock gaiaadm/pumba --log-level=debug netem --duration=100s -target=[IP] --tc-image=gaiadocker/iproute2 loss --percent=100 [container]

Expected behaviour

I'd expect the created tc helper containers to be deleted once Pumba exits. As a workaround, I'm currently using the following to clean up

docker rm -f "$(docker ps -a -q -f ancestor=gaiadocker/iproute2)"
alexei-led commented 4 years ago

@jonastheis thank you for reporting this issue. Probably, it's related to API version, pumba is using. Need to check.