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

Multiple matching container netem commands executed in sequentially when triggered with docker run #112

Closed
ghost opened this issue Dec 10, 2018 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Dec 10, 2018

I have below logs for multiple re2 matching containers, however emulation seems to be applied on sequential, I think they need to be applied in parallel to all.

Command
docker run -v /var/run/docker.sock:/var/run/docker.sock gaiaadm/pumba -l info netem --tc-image gaiadocker/iproute2 ....

time="2018-12-10T19:24:55Z" level=info msg="Running netem command '[delay 1250ms 10ms 20.00 distribution uniform]' on container f9251621908ffe25f31bb1532c33523c17c5fc0033d20a0aeb607e26c080064b for 10s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-10T19:24:55Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=f9251621908ffe25f31bb1532c33523c17c5fc0033d20a0aeb607e26c080064b iface=eth0 name=/container_2 netem="delay 1250ms 10ms 20.00 distribution uniform" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:07Z" level=info msg="stopping netem on container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.StopNetemContainer id=f9251621908ffe25f31bb1532c33523c17c5fc0033d20a0aeb607e26c080064b iface=eth0 name=/container_2 pull=true source="container/client.go:254" tc-image=gaiadocker/iproute2
time="2018-12-10T19:25:07Z" level=info msg="stop netem for container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.stopNetemContainer id=f9251621908ffe25f31bb1532c33523c17c5fc0033d20a0aeb607e26c080064b iface=eth0 name=/container_2 pull=true source="container/client.go:314" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:09Z" level=info msg="Running netem command '[delay 1250ms 10ms 20.00 distribution uniform]' on container e24042b69399ad8ac328be2b79f7bef3e15181447f5d9a33c6c3de3b2f9aa672 for 10s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-10T19:25:09Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=e24042b69399ad8ac328be2b79f7bef3e15181447f5d9a33c6c3de3b2f9aa672 iface=eth0 name=/container_5 netem="delay 1250ms 10ms 20.00 distribution uniform" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:22Z" level=info msg="stopping netem on container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.StopNetemContainer id=e24042b69399ad8ac328be2b79f7bef3e15181447f5d9a33c6c3de3b2f9aa672 iface=eth0 name=/container_5 pull=true source="container/client.go:254" tc-image=gaiadocker/iproute2
time="2018-12-10T19:25:22Z" level=info msg="stop netem for container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.stopNetemContainer id=e24042b69399ad8ac328be2b79f7bef3e15181447f5d9a33c6c3de3b2f9aa672 iface=eth0 name=/container_5 pull=true source="container/client.go:314" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:24Z" level=info msg="Running netem command '[delay 1250ms 10ms 20.00 distribution uniform]' on container 1629dd7c7ecbbcfa6a6f77093cf4787eb71c4a1b44d498228963ed4f798d54f7 for 10s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-10T19:25:24Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=1629dd7c7ecbbcfa6a6f77093cf4787eb71c4a1b44d498228963ed4f798d54f7 iface=eth0 name=/container_3 netem="delay 1250ms 10ms 20.00 distribution uniform" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:36Z" level=info msg="stopping netem on container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.StopNetemContainer id=1629dd7c7ecbbcfa6a6f77093cf4787eb71c4a1b44d498228963ed4f798d54f7 iface=eth0 name=/container_3 pull=true source="container/client.go:254" tc-image=gaiadocker/iproute2
time="2018-12-10T19:25:36Z" level=info msg="stop netem for container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.stopNetemContainer id=1629dd7c7ecbbcfa6a6f77093cf4787eb71c4a1b44d498228963ed4f798d54f7 iface=eth0 name=/container_3 pull=true source="container/client.go:314" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:39Z" level=info msg="Running netem command '[delay 1250ms 10ms 20.00 distribution uniform]' on container bf296b86e9679eebc84d8027232df20444ae73b4b19a688ec22867c834b00491 for 10s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-10T19:25:39Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=bf296b86e9679eebc84d8027232df20444ae73b4b19a688ec22867c834b00491 iface=eth0 name=/container_4 netem="delay 1250ms 10ms 20.00 distribution uniform" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:51Z" level=info msg="stopping netem on container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.StopNetemContainer id=bf296b86e9679eebc84d8027232df20444ae73b4b19a688ec22867c834b00491 iface=eth0 name=/container_4 pull=true source="container/client.go:254" tc-image=gaiadocker/iproute2
time="2018-12-10T19:25:51Z" level=info msg="stop netem for container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.stopNetemContainer id=bf296b86e9679eebc84d8027232df20444ae73b4b19a688ec22867c834b00491 iface=eth0 name=/container_4 pull=true source="container/client.go:314" tcimage=gaiadocker/iproute2
time="2018-12-10T19:25:53Z" level=info msg="Running netem command '[delay 1250ms 10ms 20.00 distribution uniform]' on container 5e994c4a76c775d66f1e5646a37f314ef5022afcdd35bb219315b658d7a9c109 for 10s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-10T19:25:53Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=5e994c4a76c775d66f1e5646a37f314ef5022afcdd35bb219315b658d7a9c109 iface=eth0 name=/container_1 netem="delay 1250ms 10ms 20.00 distribution uniform" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-10T19:26:05Z" level=info msg="stopping netem on container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.StopNetemContainer id=5e994c4a76c775d66f1e5646a37f314ef5022afcdd35bb219315b658d7a9c109 iface=eth0 name=/container_1 pull=true source="container/client.go:254" tc-image=gaiadocker/iproute2
time="2018-12-10T19:26:05Z" level=info msg="stop netem for container" IPs="[]" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.stopNetemContainer id=5e994c4a76c775d66f1e5646a37f314ef5022afcdd35bb219315b658d7a9c109 iface=eth0 name=/container_1 pull=true source="container/client.go:314" tcimage=gaiadocker/iproute2

can you please guide me? TIA

@alexei-led
Copy link
Owner

@lazerion thank you for reporting issue.
There is a bug indeed. The netem should run in parallel. I will think about proper fix for this issue.

If you would like to help the function runNetem should be executed in Go routine, I just need to figure out how to handle errors.

@alexei-led
Copy link
Owner

@lazerion please try gaiaadm/pumba:netem-parallel image and let me know if it worked. Thank you.

@ghost
Copy link
Author

ghost commented Dec 12, 2018

@alexei-led thanks, it works parallel now!

time="2018-12-12T11:32:55Z" level=info msg="Running netem command '[delay 10000ms 10ms 20.00 distribution normal]' on container c5224338014e2c1e9826fcf9e227d304b549769385b63213e9c522603be2d679 for 2m0s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-12T11:32:55Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=c5224338014e2c1e9826fcf9e227d304b549769385b63213e9c522603be2d679 iface=eth0 name=/container-2_1 netem="delay 10000ms 10ms 20.00 distribution normal" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2
time="2018-12-12T11:32:55Z" level=info msg="Running netem command '[delay 10000ms 10ms 20.00 distribution normal]' on container 2490e1418e13c9eab6dde4453929e00a7ec25ee5591afb6ac4c7c119b77c2b77 for 2m0s" app=pumba function=github.com/alexei-led/pumba/pkg/container.dockerClient.NetemContainer source="container/client.go:233"
time="2018-12-12T11:32:55Z" level=info msg="start netem for container" app=pumba dryrun=false function=github.com/alexei-led/pumba/pkg/container.dockerClient.startNetemContainer id=2490e1418e13c9eab6dde4453929e00a7ec25ee5591afb6ac4c7c119b77c2b77 iface=eth0 name=/container-3_1 netem="delay 10000ms 10ms 20.00 distribution normal" pull=true source="container/client.go:291" tcimage=gaiadocker/iproute2

can we use this image until fix is released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant