Mon, Mar 14, 2016 at 02:44:08PM IST, idosch(a)mellanox.com wrote:
We are seeing failures in our nightly regression where ping fails due
to
rate being lower than limit. The machine logs suggest the first few
packets are dropped (while the links stabilize), but the rest go through
just fine.
Solve that by lowering the rate limit in order to take into account the
initial packet drop.
Signed-off-by: Ido Schimmel <idosch(a)mellanox.com>
---
recipes/switchdev/TestLib.py | 6 +++---
recipes/switchdev/l2-005-bridge_bond_failover.py | 8 ++++----
recipes/switchdev/l2-007-bridge_team_failover.py | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/recipes/switchdev/TestLib.py b/recipes/switchdev/TestLib.py
index 1159a30..db97122 100644
--- a/recipes/switchdev/TestLib.py
+++ b/recipes/switchdev/TestLib.py
@@ -57,7 +57,7 @@ class TestLib:
m2.run(linkneg_mod, desc=desc)
- def ping_simple(self, if1, if2, fail_expected=False, desc=None):
+ def ping_simple(self, if1, if2, fail_expected=False, desc=None, rate=90):
if not desc:
desc = self._generate_default_desc(if1, if2)
@@ -73,7 +73,7 @@ class TestLib:
"count": 100,
"interval": 0.2,
"iface" : if1.get_devname(),
- "limit_rate": 90})
+ "limit_rate": rate})
I'll rename it to 'limit_rate' and send a v2.
>
> ping_mod6 = self._ctl.get_module("Icmp6Ping",
> options={
>@@ -81,7 +81,7 @@ class TestLib:
> "count": 100,
> "interval": 0.2,
> "iface" : if1.get_ip(1),
>- "limit_rate": 90})
>+ "limit_rate": rate})
>
> if self._ipv in [ 'ipv6', 'both' ]:
> m1.run(ping_mod6, fail_expected=fail_expected, desc=desc)
>diff --git a/recipes/switchdev/l2-005-bridge_bond_failover.py
b/recipes/switchdev/l2-005-bridge_bond_failover.py
>index c7b4eca..a82294c 100644
>--- a/recipes/switchdev/l2-005-bridge_bond_failover.py
>+++ b/recipes/switchdev/l2-005-bridge_bond_failover.py
>@@ -33,22 +33,22 @@ def do_task(ctl, hosts, ifaces, aliases):
> tl.ping_simple(m1_lag1, m2_lag1)
>
> sw_if1.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if1.set_link_up()
> sw_if2.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if2.set_link_up()
> sw_if1.set_link_down()
> sw_if3.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if1.set_link_up()
> sw_if3.set_link_up()
> sw_if2.set_link_down()
> sw_if4.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> do_task(ctl, [ctl.get_host("machine1"),
> ctl.get_host("machine2"),
>diff --git a/recipes/switchdev/l2-007-bridge_team_failover.py
b/recipes/switchdev/l2-007-bridge_team_failover.py
>index 23d1a7c..9ddb181 100644
>--- a/recipes/switchdev/l2-007-bridge_team_failover.py
>+++ b/recipes/switchdev/l2-007-bridge_team_failover.py
>@@ -39,22 +39,22 @@ def do_task(ctl, hosts, ifaces, aliases):
> tl.ping_simple(m1_lag1, m2_lag1)
>
> sw_if1.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if1.set_link_up()
> sw_if2.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if2.set_link_up()
> sw_if1.set_link_down()
> sw_if3.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> sw_if1.set_link_up()
> sw_if3.set_link_up()
> sw_if2.set_link_down()
> sw_if4.set_link_down()
>- tl.ping_simple(m1_lag1, m2_lag1)
>+ tl.ping_simple(m1_lag1, m2_lag1, rate=50)
>
> do_task(ctl, [ctl.get_host("machine1"),
> ctl.get_host("machine2"),
>--
>2.4.10
>