alexei-led / pumba

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

Any plan to support podman? #238

Open leiless opened 1 year ago

leiless commented 1 year ago

Hi, the pumba developers. podman is getting increasingly popular those days, do you guys have any plans to support podman in near future?

alexei-led commented 1 year ago

I'm working on containerd support. Once it's completed will check podman

leiless commented 1 year ago

FYI, minimal not working example:

$ podman run -it --rm --name ping-test --cap-add CAP_NET_RAW --cap-add CAP_NET_ADMIN alpine ping 1.1.1.1

$ podman exec -it ping-test sh -c "route -n | grep ^0.0.0.0 | rev | cut -d' ' -f1 | rev"
tap0

$ PODMAN_SOCKET=$(systemctl --user status -l podman.socket | grep -w Listen | awk '{print $2}')
$ ls -l $PODMAN_SOCKET
srw-rw---- 1 lei lei 0 Feb  6 09:08 /run/user/1000/podman/podman.sock

$ podman run -it --rm --cap-add CAP_NET_RAW --cap-add CAP_NET_ADMIN \
    -v "$PODMAN_SOCKET":/var/run/docker.sock \
    -v "$PWD/pumba:/usr/local/bin/pumba" \
        alpine pumba netem --interface tap0 --duration 1m delay --time 3000 ping-test

WARN[0000] failed to delay network for container         error="netem failed: failed to check if command exists in a container: Error response from daemon: must provide at least one stream to attach to: invalid argument"
FATA[0000] error running netem delay command: error running chaos command: failed to delay packets for one or more containers: netem failed: failed to check if command exists in a container: Error response from daemon: must provide at least one stream to attach to: invalid argument

It seems that podman socket and docker socket have a totally different designs, and it's incompatible with each other?