jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.84k stars 718 forks source link

Be able to use other network device in iptables #601

Open wb14123 opened 3 weeks ago

wb14123 commented 3 weeks ago

In net/iptables, it uses the network device eth0 for network operations. But the network device may be different on some machines. So create a function to accept a network device parameter.

aphyr commented 3 weeks ago

I would say... let's promote this from a reify to a full (defrecord IPTables [dev ...] ...). It'll be more friendly for printing. We can't get away from the static (def iptables) without breaking compatibility, but it might make sense to add (defn iptables* [option-map] ...) as an underlying constructor--that'll set the groundwork for breaking compat in a later release.

Or, if you just need a one-off, you can reify your own implementation of net in your test. I'm for parameterizing the device though! I haven't needed it so far but it makes total sense.