[lnst] team recipes: add some new and do some cleanup
by Jiří Pírko
commit bb14b25eb9e3754b538e797d46dc40ccb9557963
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Fri Sep 7 19:35:41 2012 +0200
team recipes: add some new and do some cleanup
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/multicast/cmd_sequences/block_source.xml | 10 ++--
recipes/multicast/cmd_sequences/if.xml | 6 +-
recipes/multicast/cmd_sequences/loop.xml | 8 ++--
recipes/multicast/cmd_sequences/max_groups.xml | 4 +-
recipes/multicast/cmd_sequences/membership.xml | 4 +-
recipes/multicast/cmd_sequences/simple.xml | 4 +-
.../multicast/cmd_sequences/source_membership.xml | 10 ++--
recipes/multicast/cmd_sequences/ttl.xml | 12 +++---
recipes/multicast/multicast-all.xml | 4 +-
recipes/team/machineconfig-dhcp-37-128.xml | 8 ++++
recipes/team/machineconfig-peanut.xml | 8 ++++
recipes/team/netconfig-bond_lacp.xml | 20 +++++++++
recipes/team/netconfig-simple.xml | 4 +-
recipes/team/netconfig-simple_br.xml | 16 +++++++
...onfig-team_ab_001.xml => netconfig-team_ab.xml} | 14 ++++++-
recipes/team/netconfig-team_ab_002.xml | 44 --------------------
recipes/team/netconfig-team_bcast.xml | 24 +++++++++++
...fig-team_ab_001.xml => netconfig-team_lacp.xml} | 26 ++++++------
recipes/team/netconfig-team_lb.xml | 27 ++++++++++++
recipes/team/netconfig-team_rr.xml | 8 +++-
.../team/{recipe_002.xml => recipex_ab_001.xml} | 10 +++--
recipes/team/recipex_ab_002.xml | 36 ++++++++++++++++
.../team/{recipe_003.xml => recipex_ab_003.xml} | 12 +++--
recipes/team/recipex_ab_004.xml | 21 +++++++++
.../team/{recipe_003.xml => recipex_bcast_001.xml} | 10 +++--
recipes/team/recipex_bcast_002.xml | 36 ++++++++++++++++
.../team/{recipe_003.xml => recipex_bcast_003.xml} | 12 +++--
recipes/team/recipex_bcast_004.xml | 21 +++++++++
.../team/{recipe_003.xml => recipex_lacp_001.xml} | 10 +++--
recipes/team/recipex_lacp_002.xml | 36 ++++++++++++++++
recipes/team/recipex_lacp_003.xml | 21 +++++++++
recipes/team/recipex_lacp_004.xml | 21 +++++++++
.../team/{recipe_003.xml => recipex_lb_001.xml} | 10 +++--
recipes/team/recipex_lb_002.xml | 36 ++++++++++++++++
.../team/{recipe_003.xml => recipex_lb_003.xml} | 12 +++--
recipes/team/recipex_lb_004.xml | 21 +++++++++
.../team/{recipe_001.xml => recipex_rr_001.xml} | 8 ++-
recipes/team/recipex_rr_002.xml | 36 ++++++++++++++++
.../team/{recipe_003.xml => recipex_rr_003.xml} | 12 +++--
.../team/{recipe_003.xml => recipex_rr_004.xml} | 12 +++--
recipes/team/sequence_iperf.xml | 18 ++++++++
recipes/team/sequence_ping_simple.xml | 16 +++++--
recipes/team/sequence_pktgen.xml | 21 +++++++++
recipes/team/sequence_pktgen_lacp.xml | 21 +++++++++
44 files changed, 590 insertions(+), 140 deletions(-)
---
diff --git a/recipes/multicast/cmd_sequences/block_source.xml b/recipes/multicast/cmd_sequences/block_source.xml
index f351a79..ae3a9c0 100644
--- a/recipes/multicast/cmd_sequences/block_source.xml
+++ b/recipes/multicast/cmd_sequences/block_source.xml
@@ -24,7 +24,7 @@
<option name="duration" value="10"/>
<option name="delay" value="0.1"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -34,8 +34,8 @@
<option name="address" value="238.0.0.1"/>
<option name="port" value="1337"/>
<option name="duration" value="10"/>
- <option name="interface" value="{ip(2,1)}"/>
- <option name="source" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
+ <option name="source" value="{ip(1,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
<option name="condition" value="packets_received_while_blocking == 0"/>
@@ -55,7 +55,7 @@
<option name="duration" value="10"/>
<option name="delay" value="0.1"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -65,7 +65,7 @@
<option name="address" value="238.0.0.1"/>
<option name="port" value="1337"/>
<option name="duration" value="10"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="source" value="127.0.0.200"/>
<option name="condition" value="packets_received > 0"/>
diff --git a/recipes/multicast/cmd_sequences/if.xml b/recipes/multicast/cmd_sequences/if.xml
index dfd1108..3de948c 100644
--- a/recipes/multicast/cmd_sequences/if.xml
+++ b/recipes/multicast/cmd_sequences/if.xml
@@ -26,7 +26,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -36,7 +36,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
@@ -55,7 +55,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
diff --git a/recipes/multicast/cmd_sequences/loop.xml b/recipes/multicast/cmd_sequences/loop.xml
index d4b57d6..c1dbcc3 100644
--- a/recipes/multicast/cmd_sequences/loop.xml
+++ b/recipes/multicast/cmd_sequences/loop.xml
@@ -20,7 +20,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="loop" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -30,7 +30,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
@@ -49,7 +49,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="loop" value="0"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -59,7 +59,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
<option name="condition" value="packets_received == 0"/>
</options>
diff --git a/recipes/multicast/cmd_sequences/max_groups.xml b/recipes/multicast/cmd_sequences/max_groups.xml
index a27197f..1082d74 100644
--- a/recipes/multicast/cmd_sequences/max_groups.xml
+++ b/recipes/multicast/cmd_sequences/max_groups.xml
@@ -5,7 +5,7 @@
<command machine_id="1" timeout="30" type="test" value="Multicast">
<options>
<option name="setup" value="max_groups"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
<option name="condition" value="max_groups > 0"/>
</options>
</command>
@@ -15,7 +15,7 @@
<command machine_id="1" timeout="30" type="test" value="Multicast">
<options>
<option name="setup" value="max_groups"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
<option name="condition" value="max_groups == 5"/>
</options>
</command>
diff --git a/recipes/multicast/cmd_sequences/membership.xml b/recipes/multicast/cmd_sequences/membership.xml
index b4c63be..ecea8ba 100644
--- a/recipes/multicast/cmd_sequences/membership.xml
+++ b/recipes/multicast/cmd_sequences/membership.xml
@@ -26,7 +26,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -36,7 +36,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
<option name="condition" value="packets_received_after_drop == 0"/>
diff --git a/recipes/multicast/cmd_sequences/simple.xml b/recipes/multicast/cmd_sequences/simple.xml
index 88cddd1..d3c3119 100644
--- a/recipes/multicast/cmd_sequences/simple.xml
+++ b/recipes/multicast/cmd_sequences/simple.xml
@@ -11,7 +11,7 @@
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -21,7 +21,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
diff --git a/recipes/multicast/cmd_sequences/source_membership.xml b/recipes/multicast/cmd_sequences/source_membership.xml
index a659e74..62bfa86 100644
--- a/recipes/multicast/cmd_sequences/source_membership.xml
+++ b/recipes/multicast/cmd_sequences/source_membership.xml
@@ -29,7 +29,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -39,8 +39,8 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
- <option name="source" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
+ <option name="source" value="{ip(1,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
<option name="condition" value="packets_received_after_drop == 0"/>
@@ -60,7 +60,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -70,7 +70,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="source" value="127.0.0.200"/>
<option name="condition" value="packets_received == 0"/>
diff --git a/recipes/multicast/cmd_sequences/ttl.xml b/recipes/multicast/cmd_sequences/ttl.xml
index 72d0759..b96ad8c 100644
--- a/recipes/multicast/cmd_sequences/ttl.xml
+++ b/recipes/multicast/cmd_sequences/ttl.xml
@@ -23,7 +23,7 @@
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="0"/>
<option name="loop" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -33,7 +33,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
@@ -61,7 +61,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="0"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -71,7 +71,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
@@ -90,7 +90,7 @@
<option name="duration" value="{$test_duration}"/>
<option name="delay" value="{$send_delay}"/>
<option name="ttl" value="1"/>
- <option name="interface" value="{ip(1,1)}"/>
+ <option name="interface" value="{ip(1,testiface)}"/>
</options>
</command>
@@ -100,7 +100,7 @@
<option name="address" value="{$multicast_group}"/>
<option name="port" value="{$port}"/>
<option name="duration" value="{$test_duration}"/>
- <option name="interface" value="{ip(2,1)}"/>
+ <option name="interface" value="{ip(2,testiface)}"/>
<option name="condition" value="packets_received > 0"/>
</options>
diff --git a/recipes/multicast/multicast-all.xml b/recipes/multicast/multicast-all.xml
index 0796059..af9aae9 100644
--- a/recipes/multicast/multicast-all.xml
+++ b/recipes/multicast/multicast-all.xml
@@ -21,7 +21,7 @@
</netdevices>
</machineconfig>
<netconfig>
- <interface id="1" phys_id="1" type="eth">
+ <interface id="testiface" phys_id="1" type="eth">
<addresses>
<address value="192.168.100.226/24"/>
</addresses>
@@ -44,7 +44,7 @@
</netdevices>
</machineconfig>
<netconfig>
- <interface id="1" phys_id="1" type="eth">
+ <interface id="testiface" phys_id="1" type="eth">
<addresses>
<address value="192.168.100.215/24"/>
</addresses>
diff --git a/recipes/team/machineconfig-dhcp-37-128.xml b/recipes/team/machineconfig-dhcp-37-128.xml
new file mode 100644
index 0000000..59a4940
--- /dev/null
+++ b/recipes/team/machineconfig-dhcp-37-128.xml
@@ -0,0 +1,8 @@
+<machineconfig>
+ <info hostname="10.34.37.128"/>
+ <netdevices>
+ <netdevice type="eth" phys_id="1" hwaddr="00:10:18:61:35:9b" network="testing_green"/>
+ <netdevice type="eth" phys_id="2" hwaddr="00:10:18:48:15:fa" network="testing_magenta"/>
+ <netdevice type="eth" phys_id="3" hwaddr="00:0e:0c:b3:09:4e" network="testing_blue"/>
+ </netdevices>
+</machineconfig>
diff --git a/recipes/team/machineconfig-peanut.xml b/recipes/team/machineconfig-peanut.xml
new file mode 100644
index 0000000..43d7e61
--- /dev/null
+++ b/recipes/team/machineconfig-peanut.xml
@@ -0,0 +1,8 @@
+<machineconfig>
+ <info hostname="10.34.33.99"/>
+ <netdevices>
+ <netdevice type="eth" phys_id="1" hwaddr="d4:85:64:01:46:9e" network="testing_green"/>
+ <netdevice type="eth" phys_id="2" hwaddr="00:e0:4c:14:2e:5d" network="testing_magenta"/>
+ <netdevice type="eth" phys_id="3" hwaddr="00:30:4f:7f:fd:30" network="testing_blue"/>
+ </netdevices>
+</machineconfig>
diff --git a/recipes/team/netconfig-bond_lacp.xml b/recipes/team/netconfig-bond_lacp.xml
new file mode 100644
index 0000000..0492c22
--- /dev/null
+++ b/recipes/team/netconfig-bond_lacp.xml
@@ -0,0 +1,20 @@
+<netconfig>
+ <interface id="1" phys_id="1" type="eth"/>
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="bond">
+ <options>
+ <option name="mode" value="4"/>
+ <option name="lacp_rate" value="1"/>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-simple.xml b/recipes/team/netconfig-simple.xml
index b0473e5..78bebde 100644
--- a/recipes/team/netconfig-simple.xml
+++ b/recipes/team/netconfig-simple.xml
@@ -1,7 +1,9 @@
<netconfig>
- <interface id="1" phys_id="1" type="eth">
+ <interface id="testiface" phys_id="1" type="eth">
<addresses>
<address value="{$testip}"/>
</addresses>
</interface>
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
</netconfig>
diff --git a/recipes/team/netconfig-simple_br.xml b/recipes/team/netconfig-simple_br.xml
new file mode 100644
index 0000000..867d390
--- /dev/null
+++ b/recipes/team/netconfig-simple_br.xml
@@ -0,0 +1,16 @@
+<netconfig>
+ <interface id="1" phys_id="1" type="eth"/>
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="bridge">
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-team_ab_001.xml b/recipes/team/netconfig-team_ab.xml
similarity index 70%
copy from recipes/team/netconfig-team_ab_001.xml
copy to recipes/team/netconfig-team_ab.xml
index d3ed392..107ab3f 100644
--- a/recipes/team/netconfig-team_ab_001.xml
+++ b/recipes/team/netconfig-team_ab.xml
@@ -18,10 +18,20 @@
</option>
</options>
</interface>
- <interface id="3" type="team">
+ <interface id="3" phys_id="3" type="eth">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": 50
+ }
+ </option>
+ </options>
+ </interface>
+ <interface id="testiface" type="team">
<options>
<option name="teamd_config">
{
+ "hwaddr": "00:11:22:33:44:55",
"runner": {"name": "activebackup"},
"link_watch": {"name": "ethtool"}
}
@@ -30,9 +40,11 @@
<slaves>
<slave id="1"/>
<slave id="2"/>
+ <slave id="3"/>
</slaves>
<addresses>
<address value="{$testip}"/>
+ <address value="{$testip6}"/>
</addresses>
</interface>
</netconfig>
diff --git a/recipes/team/netconfig-team_bcast.xml b/recipes/team/netconfig-team_bcast.xml
new file mode 100644
index 0000000..9bfab08
--- /dev/null
+++ b/recipes/team/netconfig-team_bcast.xml
@@ -0,0 +1,24 @@
+<netconfig>
+ <interface id="1" phys_id="1" type="eth"/>
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "broadcast"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-team_ab_001.xml b/recipes/team/netconfig-team_lacp.xml
similarity index 53%
rename from recipes/team/netconfig-team_ab_001.xml
rename to recipes/team/netconfig-team_lacp.xml
index d3ed392..57eda3f 100644
--- a/recipes/team/netconfig-team_ab_001.xml
+++ b/recipes/team/netconfig-team_lacp.xml
@@ -3,26 +3,24 @@
<options>
<option name="teamd_port_config">
{
- "prio": -10,
- "sticky": true
+ "prio": -10
}
</option>
</options>
</interface>
- <interface id="2" phys_id="2" type="eth">
- <options>
- <option name="teamd_port_config">
- {
- "prio": 100
- }
- </option>
- </options>
- </interface>
- <interface id="3" type="team">
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="team">
<options>
<option name="teamd_config">
{
- "runner": {"name": "activebackup"},
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "lacp",
+ "active": true,
+ "fast_rate": true,
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ },
"link_watch": {"name": "ethtool"}
}
</option>
@@ -30,9 +28,11 @@
<slaves>
<slave id="1"/>
<slave id="2"/>
+ <slave id="3"/>
</slaves>
<addresses>
<address value="{$testip}"/>
+ <address value="{$testip6}"/>
</addresses>
</interface>
</netconfig>
diff --git a/recipes/team/netconfig-team_lb.xml b/recipes/team/netconfig-team_lb.xml
new file mode 100644
index 0000000..5a305ed
--- /dev/null
+++ b/recipes/team/netconfig-team_lb.xml
@@ -0,0 +1,27 @@
+<netconfig>
+ <interface id="1" phys_id="1" type="eth"/>
+ <interface id="2" phys_id="2" type="eth"/>
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "loadbalance",
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ }
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-team_rr.xml b/recipes/team/netconfig-team_rr.xml
index 4dd0a9f..b223c1a 100644
--- a/recipes/team/netconfig-team_rr.xml
+++ b/recipes/team/netconfig-team_rr.xml
@@ -1,20 +1,24 @@
<netconfig>
<interface id="1" phys_id="1" type="eth"/>
<interface id="2" phys_id="2" type="eth"/>
- <interface id="3" type="team">
+ <interface id="3" phys_id="3" type="eth"/>
+ <interface id="testiface" type="team">
<options>
<option name="teamd_config">
{
- "runner": {"name": "roundrobin"}
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "roundrobin"}
}
</option>
</options>
<slaves>
<slave id="1"/>
<slave id="2"/>
+ <slave id="3"/>
</slaves>
<addresses>
<address value="{$testip}"/>
+ <address value="{$testip6}"/>
</addresses>
</interface>
</netconfig>
diff --git a/recipes/team/recipe_002.xml b/recipes/team/recipex_ab_001.xml
similarity index 52%
rename from recipes/team/recipe_002.xml
rename to recipes/team/recipex_ab_001.xml
index d985507..0176df1 100644
--- a/recipes/team/recipe_002.xml
+++ b/recipes/team/recipex_ab_001.xml
@@ -2,17 +2,19 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-team_ab_001.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_ab.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_ab_001.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
diff --git a/recipes/team/recipex_ab_002.xml b/recipes/team/recipex_ab_002.xml
new file mode 100644
index 0000000..aec1644
--- /dev/null
+++ b/recipes/team/recipex_ab_002.xml
@@ -0,0 +1,36 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_ab.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <define>
+ <alias name="multicast_group" value="239.1.2.3"/>
+ <alias name="port" value="1337"/>
+ <alias name="test_duration" value="10"/>
+ <alias name="send_delay" value="0.1"/>
+ <alias name="nonexistent_ip" value="127.0.0.200"/>
+ </define>
+
+ <command_sequence source="../multicast/cmd_sequences/max_groups.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/block_source.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/source_membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/if.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/loop.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_ab_003.xml
similarity index 53%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_ab_003.xml
index 77fa51c..7796ec9 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_ab_003.xml
@@ -2,18 +2,20 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_ab.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple.xml"/>
</machine>
</machines>
- <command_sequence source="sequence_ping_simple.xml"/>
+ <command_sequence source="sequence_pktgen.xml"/>
</nettestrecipe>
diff --git a/recipes/team/recipex_ab_004.xml b/recipes/team/recipex_ab_004.xml
new file mode 100644
index 0000000..d74113e
--- /dev/null
+++ b/recipes/team/recipex_ab_004.xml
@@ -0,0 +1,21 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_ab.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_iperf.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_bcast_001.xml
similarity index 52%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_bcast_001.xml
index 77fa51c..7e10cbc 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_bcast_001.xml
@@ -2,17 +2,19 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_bcast.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
diff --git a/recipes/team/recipex_bcast_002.xml b/recipes/team/recipex_bcast_002.xml
new file mode 100644
index 0000000..ad3e893
--- /dev/null
+++ b/recipes/team/recipex_bcast_002.xml
@@ -0,0 +1,36 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_bcast.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <define>
+ <alias name="multicast_group" value="239.1.2.3"/>
+ <alias name="port" value="1337"/>
+ <alias name="test_duration" value="10"/>
+ <alias name="send_delay" value="0.1"/>
+ <alias name="nonexistent_ip" value="127.0.0.200"/>
+ </define>
+
+ <command_sequence source="../multicast/cmd_sequences/max_groups.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/block_source.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/source_membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/if.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/loop.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_bcast_003.xml
similarity index 52%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_bcast_003.xml
index 77fa51c..acaad20 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_bcast_003.xml
@@ -2,18 +2,20 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_bcast.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple.xml"/>
</machine>
</machines>
- <command_sequence source="sequence_ping_simple.xml"/>
+ <command_sequence source="sequence_pktgen.xml"/>
</nettestrecipe>
diff --git a/recipes/team/recipex_bcast_004.xml b/recipes/team/recipex_bcast_004.xml
new file mode 100644
index 0000000..b857b99
--- /dev/null
+++ b/recipes/team/recipex_bcast_004.xml
@@ -0,0 +1,21 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_bcast.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_iperf.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_lacp_001.xml
similarity index 52%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_lacp_001.xml
index 77fa51c..3e70ece 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_lacp_001.xml
@@ -2,17 +2,19 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lacp.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-bond_lacp.xml"/>
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
diff --git a/recipes/team/recipex_lacp_002.xml b/recipes/team/recipex_lacp_002.xml
new file mode 100644
index 0000000..ddae1d0
--- /dev/null
+++ b/recipes/team/recipex_lacp_002.xml
@@ -0,0 +1,36 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lacp.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-bond_lacp.xml"/>
+ </machine>
+ </machines>
+ <define>
+ <alias name="multicast_group" value="239.1.2.3"/>
+ <alias name="port" value="1337"/>
+ <alias name="test_duration" value="10"/>
+ <alias name="send_delay" value="0.1"/>
+ <alias name="nonexistent_ip" value="127.0.0.200"/>
+ </define>
+
+ <command_sequence source="../multicast/cmd_sequences/max_groups.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/block_source.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/source_membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/if.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/loop.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipex_lacp_003.xml b/recipes/team/recipex_lacp_003.xml
new file mode 100644
index 0000000..82ba25f
--- /dev/null
+++ b/recipes/team/recipex_lacp_003.xml
@@ -0,0 +1,21 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lacp.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-bond_lacp.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_pktgen_lacp.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipex_lacp_004.xml b/recipes/team/recipex_lacp_004.xml
new file mode 100644
index 0000000..aae1ef8
--- /dev/null
+++ b/recipes/team/recipex_lacp_004.xml
@@ -0,0 +1,21 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lacp.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-bond_lacp.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_iperf.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_lb_001.xml
similarity index 52%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_lb_001.xml
index 77fa51c..b680b4b 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_lb_001.xml
@@ -2,17 +2,19 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lb.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
diff --git a/recipes/team/recipex_lb_002.xml b/recipes/team/recipex_lb_002.xml
new file mode 100644
index 0000000..2519716
--- /dev/null
+++ b/recipes/team/recipex_lb_002.xml
@@ -0,0 +1,36 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lb.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <define>
+ <alias name="multicast_group" value="239.1.2.3"/>
+ <alias name="port" value="1337"/>
+ <alias name="test_duration" value="10"/>
+ <alias name="send_delay" value="0.1"/>
+ <alias name="nonexistent_ip" value="127.0.0.200"/>
+ </define>
+
+ <command_sequence source="../multicast/cmd_sequences/max_groups.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/block_source.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/source_membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/if.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/loop.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_lb_003.xml
similarity index 53%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_lb_003.xml
index 77fa51c..87c9538 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_lb_003.xml
@@ -2,18 +2,20 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lb.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple.xml"/>
</machine>
</machines>
- <command_sequence source="sequence_ping_simple.xml"/>
+ <command_sequence source="sequence_pktgen.xml"/>
</nettestrecipe>
diff --git a/recipes/team/recipex_lb_004.xml b/recipes/team/recipex_lb_004.xml
new file mode 100644
index 0000000..e3a9632
--- /dev/null
+++ b/recipes/team/recipex_lb_004.xml
@@ -0,0 +1,21 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_lb.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_iperf.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_001.xml b/recipes/team/recipex_rr_001.xml
similarity index 60%
rename from recipes/team/recipe_001.xml
rename to recipes/team/recipex_rr_001.xml
index ad5a536..7fde885 100644
--- a/recipes/team/recipe_001.xml
+++ b/recipes/team/recipex_rr_001.xml
@@ -2,17 +2,19 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
<netconfig source="netconfig-team_rr.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
diff --git a/recipes/team/recipex_rr_002.xml b/recipes/team/recipex_rr_002.xml
new file mode 100644
index 0000000..e8caa42
--- /dev/null
+++ b/recipes/team/recipex_rr_002.xml
@@ -0,0 +1,36 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_rr.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
+ </machine>
+ </machines>
+ <define>
+ <alias name="multicast_group" value="239.1.2.3"/>
+ <alias name="port" value="1337"/>
+ <alias name="test_duration" value="10"/>
+ <alias name="send_delay" value="0.1"/>
+ <alias name="nonexistent_ip" value="127.0.0.200"/>
+ </define>
+
+ <command_sequence source="../multicast/cmd_sequences/max_groups.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/block_source.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/source_membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/membership.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/if.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/loop.xml"/>
+ <command_sequence source="../multicast/cmd_sequences/simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_rr_003.xml
similarity index 60%
copy from recipes/team/recipe_003.xml
copy to recipes/team/recipex_rr_003.xml
index 77fa51c..c5fec2d 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_rr_003.xml
@@ -2,18 +2,20 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_rr.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple.xml"/>
</machine>
</machines>
- <command_sequence source="sequence_ping_simple.xml"/>
+ <command_sequence source="sequence_pktgen.xml"/>
</nettestrecipe>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipex_rr_004.xml
similarity index 53%
rename from recipes/team/recipe_003.xml
rename to recipes/team/recipex_rr_004.xml
index 77fa51c..299016e 100644
--- a/recipes/team/recipe_003.xml
+++ b/recipes/team/recipex_rr_004.xml
@@ -2,18 +2,20 @@
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
</define>
<machine id="1">
- <machineconfig source="machineconfig-test1.xml"/>
- <netconfig source="netconfig-simple.xml"/>
+ <machineconfig source="machineconfig-peanut.xml"/>
+ <netconfig source="netconfig-team_rr.xml"/>
</machine>
<define>
<alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
</define>
<machine id="2">
- <machineconfig source="machineconfig-test2.xml"/>
- <netconfig source="netconfig-team_rr.xml"/>
+ <machineconfig source="machineconfig-dhcp-37-128.xml"/>
+ <netconfig source="netconfig-simple_br.xml"/>
</machine>
</machines>
- <command_sequence source="sequence_ping_simple.xml"/>
+ <command_sequence source="sequence_iperf.xml"/>
</nettestrecipe>
diff --git a/recipes/team/sequence_iperf.xml b/recipes/team/sequence_iperf.xml
new file mode 100644
index 0000000..a279705
--- /dev/null
+++ b/recipes/team/sequence_iperf.xml
@@ -0,0 +1,18 @@
+<command_sequence>
+ <command type="exec" value="sleep 3" />
+ <command machine_id="2" type="test" value="Iperf" bg_id="1">
+ <options>
+ <option name="role" value="server" />
+ <option name="bind" value="{ip(2,testiface)}" />
+ </options>
+ </command>
+ <command type="exec" value="sleep 3" />
+ <command machine_id="1" type="test" value="Iperf">
+ <options>
+ <option name="role" value="client" />
+ <option name="duration" value="15"/>
+ <option name="iperf_server" value="{ip(2,testiface)}" />
+ </options>
+ </command>
+ <command type="kill" machine_id="2" value="1" />
+</command_sequence>
diff --git a/recipes/team/sequence_ping_simple.xml b/recipes/team/sequence_ping_simple.xml
index 41d053c..9f3c2f2 100644
--- a/recipes/team/sequence_ping_simple.xml
+++ b/recipes/team/sequence_ping_simple.xml
@@ -1,10 +1,18 @@
<command_sequence>
<command type="exec" value="sleep 4"/>
- <command machine_id="1" timeout="30" type="test" value="IcmpPing">
+ <command machine_id="1" timeout="60" type="test" value="IcmpPing">
<options>
- <option name="addr" value="{$recipe['machines']['2']['netconfig']['3']['addresses'][0]}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0.2"/>
+ <option name="addr" value="{ip(2,testiface)}"/>
+ <option name="count" value="2000"/>
+ <option name="interval" value="0.01"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </command>
+ <command machine_id="1" timeout="60" type="test" value="Icmp6Ping">
+ <options>
+ <option name="addr" value="{ip(2,testiface,1)}"/>
+ <option name="count" value="2000"/>
+ <option name="interval" value="0.01"/>
<option name="limit_rate" value="95"/>
</options>
</command>
diff --git a/recipes/team/sequence_pktgen.xml b/recipes/team/sequence_pktgen.xml
new file mode 100644
index 0000000..d375a41
--- /dev/null
+++ b/recipes/team/sequence_pktgen.xml
@@ -0,0 +1,21 @@
+<command_sequence>
+ <command type="exec" value="sleep 4"/>
+ <command machine_id="1" type="test" value="PktCounter" bg_id="1">
+ <options>
+ <option name="input_netdev_name" value="{devname(1,testiface)}"/>
+ <option name="proto" value="udp"/>
+ <option name="dport" value="9"/>
+ </options>
+ </command>
+ <command machine_id="2" type="test" value="PktgenTx" timeout="200">
+ <options>
+ <option name="pktgen_option" value="dst {ip(1,testiface)}"/>
+ <option name="pktgen_option" value="dst_mac 00:11:22:33:44:55"/>
+ <option name="pktgen_option" value="src_min {ip(2,testiface)}"/>
+ <option name="netdev_name" value="{devname(2,testiface)}"/>
+ <option name="netdev_name" value="{devname(2,2)}"/>
+ <option name="netdev_name" value="{devname(2,3)}"/>
+ </options>
+ </command>
+ <command machine_id="1" type="intr" value="1"/>
+</command_sequence>
diff --git a/recipes/team/sequence_pktgen_lacp.xml b/recipes/team/sequence_pktgen_lacp.xml
new file mode 100644
index 0000000..c1e4395
--- /dev/null
+++ b/recipes/team/sequence_pktgen_lacp.xml
@@ -0,0 +1,21 @@
+<command_sequence>
+ <command type="exec" value="sleep 4"/>
+ <command machine_id="1" type="test" value="PktCounter" bg_id="1">
+ <options>
+ <option name="input_netdev_name" value="{devname(1,testiface)}"/>
+ <option name="proto" value="udp"/>
+ <option name="dport" value="9"/>
+ </options>
+ </command>
+ <command machine_id="2" type="test" value="PktgenTx" timeout="200">
+ <options>
+ <option name="pktgen_option" value="dst {ip(1,testiface)}"/>
+ <option name="pktgen_option" value="dst_mac 00:11:22:33:44:55"/>
+ <option name="pktgen_option" value="src_min {ip(2,testiface)}"/>
+ <option name="netdev_name" value="{devname(2,1)}"/>
+ <option name="netdev_name" value="{devname(2,2)}"/>
+ <option name="netdev_name" value="{devname(2,3)}"/>
+ </options>
+ </command>
+ <command machine_id="1" type="intr" value="1"/>
+</command_sequence>
11 years, 7 months
[lnst] TestIperf: do not download and compile anything and use installed iperf
by Jiří Pírko
commit d72ae2a2ce245446bb6f3319ba7d0876920ed744
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Wed Sep 19 11:28:50 2012 +0200
TestIperf: do not download and compile anything and use installed iperf
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
Tests/TestIperf.py | 22 ++--------------------
1 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/Tests/TestIperf.py b/Tests/TestIperf.py
index 7cb6663..e928702 100644
--- a/Tests/TestIperf.py
+++ b/Tests/TestIperf.py
@@ -15,13 +15,6 @@ import errno
import re
class TestIperf(TestGeneric):
- def _install_iperf(self):
- # by default dies on failure
- logging.info("trace: _install_iperf")
- exec_cmd("wget -P %s/ %s" % (self._temp_dir, self._harness_url) )
- exec_cmd("cd %s; tar -xvzf %s" % (self._temp_dir, self._harness_archive))
- exec_cmd("cd %s/%s; ./configure; make; " % (self._temp_dir, self._harness))
-
def _compose_iperf_cmd(self, role):
iperf_options = self.get_opt("iperf_opts")
if iperf_options is None:
@@ -30,10 +23,10 @@ class TestIperf(TestGeneric):
cmd = ""
if role == "client":
iperf_server = self.get_mopt("iperf_server", opt_type="addr")
- cmd = "cd %s/%s/src; ./iperf --%s %s -t %s %s" % (self._temp_dir, self._harness, role, iperf_server, self.duration, iperf_options)
+ cmd = "iperf --%s %s -t %s %s" % (role, iperf_server, self.duration, iperf_options)
elif role == "server":
bind = self.get_opt("bind", opt_type="addr")
- cmd = "cd %s/%s/src; ./iperf --%s -B %s %s" % (self._temp_dir, self._harness, role, bind, iperf_options)
+ cmd = "iperf --%s -B %s %s" % (role, bind, iperf_options)
return cmd
@@ -130,9 +123,6 @@ class TestIperf(TestGeneric):
def run(self):
self._keep_server_running = True
- self._harness = "iperf-2.0.5"
- self._harness_archive = self._harness + ".tar.gz"
- self._harness_url = "http://sourceforge.net/projects/iperf/files/%s/download" % self._harness_archive
self.duration = self.get_opt("duration")
if self.duration is None:
@@ -140,14 +130,6 @@ class TestIperf(TestGeneric):
else:
self._keep_server_running = False # for server purposes
- # same for client and server
- installed = self.get_opt("install_dir")
- if installed is None:
- self._temp_dir = (exec_cmd("mktemp -d")[0]).strip()
- self._install_iperf()
- else:
- self._temp_dir = installed
-
self.threshold = self.get_opt("threshold")
role = self.get_mopt("role")
11 years, 7 months
[lnst] TestPktgenTx: override default options
by Jiří Pírko
commit 506c014ce41db7ff31d7a05d2f2a9f96c7867e1a
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Wed Sep 19 10:34:26 2012 +0200
TestPktgenTx: override default options
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
Tests/TestPktgenTx.py | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/Tests/TestPktgenTx.py b/Tests/TestPktgenTx.py
index 46660c9..030dd4f 100644
--- a/Tests/TestPktgenTx.py
+++ b/Tests/TestPktgenTx.py
@@ -51,6 +51,16 @@ class PktgenWorkers:
wrkr = self._get_wrkr()
wrkr.set("add_device %s" % dev_name)
+def pktget_options_merge(pktgen_options, default_pktgen_options):
+ opts = [re.split('\s+', opt) for opt in pktgen_options]
+ def_opts = [re.split('\s+', opt) for opt in default_pktgen_options]
+ res = []
+ for def_opt in def_opts:
+ if not def_opt[0] in [opt[0] for opt in opts]:
+ res.append(def_opt)
+ res = res + opts
+ return [" ".join(opt) for opt in res]
+
class TestPktgenTx(TestGeneric):
def run(self):
dev_names = self.get_multi_mopt("netdev_name")
@@ -61,6 +71,8 @@ class TestPktgenTx(TestGeneric):
"clone_skb 100000",
"pkt_size 60",
]
+ pktgen_options = pktget_options_merge(pktgen_options,
+ default_pktgen_options)
exec_cmd("modprobe pktgen")
@@ -71,8 +83,6 @@ class TestPktgenTx(TestGeneric):
for dev_name in dev_names:
pgwrkr.add_device(dev_name)
pg = Pktgen("/proc/net/pktgen/%s" % dev_name)
- for pktgen_option in default_pktgen_options:
- pg.set(pktgen_option)
for pktgen_option in pktgen_options:
pg.set(pktgen_option)
pgctl.set("start")
11 years, 7 months
[lnst] #5: Controller/Slaves check sequence
by fedora-badges
#5: Controller/Slaves check sequence
-------------------------+-------------------------
Reporter: rpazdera | Owner: rpazdera@…
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-------------------------
Common failure of LNST recipe setups is caused by NetworkManager or
iptables enabled on slave machines. We could introduce some sort of
checking mechanism that would emit warning in case someone's running lnst
along with these applications.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/5>
lnst <http://example.org/>
My example project
11 years, 7 months
[lnst trac] #18: netem support in lnst
by fedora-badges
#18: netem support in lnst
-------------------------+-----------------------
Reporter: jtluka | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
netem provides Network Emulation functionality for testing protocols by
emulating the properties of wide area networks. The current version
emulates variable delay, loss, duplication and re-ordering.
For the start I'd like to use packet re-order and corruption features.
http://www.linuxfoundation.org/collaborate/workgroups/networking/netem
There are two ways to implement this:
1. as a test, e.g. TestNetEm
2. as a framework service
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/18>
lnst <http://example.org/>
My example project
11 years, 7 months
[lnst] Logs: warn user if slave can't connect to logging server
by Jiří Pírko
commit f33f1afcf9d4d0536010fc29dcbfd5d5227a4576
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Thu Sep 13 16:38:15 2012 +0200
Logs: warn user if slave can't connect to logging server
Currently logging doesn't work correctly if the connection between a
slave and the controller isn't properly set up. This can be for example
caused by a firewall. In these cases it can be confusing to users
because there is no indication of it other than missing logs.
This patch changes that. It adds a new function test_tcp_connection() to
the NetUtils module. Slaves use it to check if they are able to connect to
the logging server and inform the controller of the results. The
controller can then log an error message in case of a failure.
I tried making the error message more visible so that it's harder to
overlook.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Common/NetUtils.py | 9 +++++++++
NetTest/NetTestController.py | 6 +++++-
NetTest/NetTestSlave.py | 6 ++++--
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/Common/NetUtils.py b/Common/NetUtils.py
index d7db077..fb39a41 100644
--- a/Common/NetUtils.py
+++ b/Common/NetUtils.py
@@ -37,6 +37,15 @@ def scan_netdevs():
scan.append({"name": d, "hwaddr": addr})
return scan
+def test_tcp_connection(host, port):
+ try:
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.connect((host, port))
+ s.shutdown(socket.SHUT_RDWR)
+ return True
+ except:
+ return False
+
def verify_ip_address(addr):
if len(addr.split('.')) != 4:
return False
diff --git a/NetTest/NetTestController.py b/NetTest/NetTestController.py
index 95326e3..526a3e7 100644
--- a/NetTest/NetTestController.py
+++ b/NetTest/NetTestController.py
@@ -261,7 +261,11 @@ class NetTestController:
logging.info("Setting logging server on machine %s", hostname)
rpc = self._get_machinerpc(machine_id)
ip_addr = get_corespond_local_ip(hostname)
- rpc.set_logging(ip_addr, self._config.get_option('log', 'port'))
+ if not rpc.set_logging(ip_addr, self._config.get_option('log', 'port')):
+ logging.error("==================================================")
+ logging.error("Machine %s is unable to connect to the logging "\
+ "server! Check your firewall settings." % hostname)
+ logging.error("==================================================")
def _deconfigure_slaves(self):
if 'machines' not in self._recipe:
diff --git a/NetTest/NetTestSlave.py b/NetTest/NetTestSlave.py
index 7c391f8..a375f12 100644
--- a/NetTest/NetTestSlave.py
+++ b/NetTest/NetTestSlave.py
@@ -22,7 +22,7 @@ from NetConfig.NetConfig import NetConfig
from NetConfig.NetConfigDevice import NetConfigDeviceAllCleanup
from NetTest.NetTestCommand import NetTestCommandContext, NetTestCommand, CommandException
from Common.Utils import die_when_parent_die
-from Common.NetUtils import scan_netdevs
+from Common.NetUtils import scan_netdevs, test_tcp_connection
DefaultRPCPort = 9999
@@ -45,8 +45,10 @@ class NetTestSlaveXMLRPC:
@param logger_address: Address of running logger.
"""
+ connectable = test_tcp_connection(logger_address, port)
+
Logs.append_network_hadler(logger_address, port)
- return True
+ return connectable
def get_devices_by_hwaddr(self, hwaddr):
name_scan = scan_netdevs()
11 years, 7 months
[lnst] Fixed interrupt handling in TCPConnect and TCPListen
by Jiří Pírko
commit e7017a68ca496659442e3866c4cbaac1a278b6be
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Thu Sep 13 14:59:24 2012 +0200
Fixed interrupt handling in TCPConnect and TCPListen
Fixed interrupt signal handling in the tests. All socket operations were
changed to non-blocking so that workers can stop their execution almost
immediately. Tested on RHEL5.9/RHEL6.3 instances.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Tests/TestTCPConnect.py | 88 +++++++++++++++++++++++++++++------------
Tests/TestTCPListen.py | 101 ++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 148 insertions(+), 41 deletions(-)
---
diff --git a/Tests/TestTCPConnect.py b/Tests/TestTCPConnect.py
index 0a6c655..f4020f0 100644
--- a/Tests/TestTCPConnect.py
+++ b/Tests/TestTCPConnect.py
@@ -9,13 +9,14 @@ jtluka(a)redhat.com (Jan Tluka)
import sys
import socket
import errno
-from multiprocessing import Process, Lock
+from multiprocessing import Process, Value
from signal import signal, SIGINT
from time import sleep
from random import randrange, sample
import logging
import re
from Common.TestsCommon import TestGeneric
+import ctypes
"""
Test description:
@@ -35,52 +36,81 @@ Parameters:
class ConnectionWorker():
def __init__(self, host, port, sleep_time = None, continuous = None):
- self._tlock = Lock()
- self._terminate = 0
self._host = host
self._port = port
self._sleep_time = sleep_time
self._cont = continuous
self._ascii = [chr(i) for i in range(0,255)]
- def terminate(self):
- self._tlock.acquire()
- self._terminate=1
- self._tlock.release()
-
- def run(self):
+ def run(self, closecon):
loop = True
- while loop:
+ while loop and not closecon.value:
loop = (self._cont is not None)
logging.debug("Starting connection to (%s) port %s " % (self._host,
self._port))
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ except socket.error, msg:
+ logging.debug(msg)
+ return
+
+ s.settimeout(5)
+
+ try:
s.connect((self._host, self._port))
+ except socket.timeout, msg:
+ logging.debug("Could not connect to %s port %s" %
+ (self._host, self._port))
+ s.close()
+ continue
except socket.error, msg:
+ logging.debug(msg)
s.close()
- s = None
- logging.error(msg)
- return
+ break
+
+ s.settimeout(1)
for txs in range(10, randrange(20,100)):
- self._tlock.acquire()
- if self._terminate:
- self._tlock.release()
+ if closecon.value:
logging.debug("Terminating connection on port %s" %
self._port)
loop = False
- break
- else:
- self._tlock.release()
+ s.settimeout(0)
+ try:
+ s.shutdown(socket.SHUT_WR)
+ except:
+ pass
+ s.close()
+ return
rnd_str = "".join(sample(self._ascii, len(self._ascii)))
- data = s.sendall(rnd_str)
+ while True and not closecon.value:
+ try:
+ data = s.sendall(rnd_str)
+ except socket.timeout:
+ continue
+ except socket.error, msg:
+ logging.debug(msg)
+ s.settimeout(0)
+ try:
+ s.shutdown(socket.SHUT_WR)
+ except:
+ pass
+ s.close()
+ return
+
+ break
+
if (self._sleep_time):
sleep(self._sleep_time)
+ s.settimeout(0)
+ try:
+ s.shutdown(socket.SHUT_WR)
+ except:
+ pass
s.close()
@@ -129,18 +159,17 @@ class TestTCPConnect(TestGeneric):
def _close_connections(self, signum, frame):
logging.debug("Termination signal delivered ...")
- for cw in self._cw_instances:
- cw.terminate()
+ self._closecon.value = True
def _set_interrupt_handler(self):
signal(SIGINT, self._close_connections)
def run(self):
- self._terminate = 0
self._host = None
self._port = None
self._cont = None
self._cw_instances = []
+ self._closecon = Value(ctypes.c_bool, False, lock=True)
self._set_interrupt_handler()
@@ -158,10 +187,17 @@ class TestTCPConnect(TestGeneric):
cw = ConnectionWorker(self._host, p, self._sleep_time, self._cont)
self._cw_instances.append(cw)
- w = Process(target=cw.run)
+ w = Process(target=cw.run, args=(self._closecon,))
w.start()
workers.append(w)
logging.debug("Waiting for workers ...")
- for w in workers:
- w.join()
+ while len(workers) > 0:
+ for w in workers:
+ try:
+ w.join()
+ except OSError, e:
+ continue
+ workers.remove(w)
+
+ logging.info("Connect: Finished ...")
diff --git a/Tests/TestTCPListen.py b/Tests/TestTCPListen.py
index c214a3d..3cf0798 100644
--- a/Tests/TestTCPListen.py
+++ b/Tests/TestTCPListen.py
@@ -11,8 +11,10 @@ import socket
import errno
import logging
import re
-from multiprocessing import Process
+from multiprocessing import Process, Value
from Common.TestsCommon import TestGeneric
+from signal import signal, SIGINT
+import ctypes
"""
Test description:
@@ -34,6 +36,8 @@ class TestTCPListen(TestGeneric):
self._addr = None
self._port = None
self._cont = None
+ self._closecon = Value(ctypes.c_bool, False, lock=True)
+
TestGeneric.__init__(self, command)
def _parse_options(self):
@@ -57,36 +61,83 @@ class TestTCPListen(TestGeneric):
if cont:
self._cont = cont
- def _worker(self, host, port):
+ def _worker(self, host, port, connections, closecon):
logging.debug("Starting listener (%s) on port %s " % (host, port))
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.settimeout(1)
+ except socket.error, msg:
+ logging.debug(msg)
+ return
+
+ try:
+ s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host, port))
s.listen(1)
except socket.error, msg:
+ logging.debug(msg)
s.close()
- s = None
- logging.error(msg)
return
loop = 1
- while loop or self._cont:
- conn, addr = s.accept()
+ while (loop or self._cont) and not closecon.value:
+ conn = None
+ while conn == None and not closecon.value:
+ try:
+ conn, addr = s.accept()
+ except socket.timeout, e:
+ continue
+ except socket.error, e:
+ logging.debug(e)
+ s.close()
+ return
+ except:
+ logging.warning("Unknown exception.")
+ s.close()
+ return
+
+ if conn:
+ connections.value += 1
+ conn.settimeout(1)
+ else:
+ continue
+
logging.debug('Connected from ' + addr[0] + ' port:' +
str(addr[1]))
- while 1:
- data = conn.recv(1024)
+ while not closecon.value:
+ try:
+ data = conn.recv(1024)
+ except socket.timeout, e:
+ continue
+ except socket.error, e:
+ logging.debug(e)
+ if conn:
+ conn.shutdown(socket.SHUT_RDWR)
+ conn.close()
+ s.close()
+ return
+
if not data:
logging.debug('Client disconnected: ' + addr[0] +
' port:' + str(addr[1]))
break
- conn.close()
+ if conn:
+ try:
+ conn.shutdown(socket.SHUT_RDWR)
+ conn.close()
+ except socket.error, msg:
+ logging.debug(msg)
+ s.close()
+ return
+
loop = 0
+ s.close()
+
def _parse_port_range(self):
if self._port_range == None:
return []
@@ -104,7 +155,16 @@ class TestTCPListen(TestGeneric):
return range(low, high)
+ def _terminate(self, signum, frame):
+ self._closecon.value = True
+ logging.debug("Listen: terminate called")
+
+ def _set_interrupt_handler(self):
+ signal(SIGINT, self._terminate)
+
def run(self):
+ self._set_interrupt_handler()
+
self._parse_options()
ports = []
@@ -114,14 +174,25 @@ class TestTCPListen(TestGeneric):
r = self._parse_port_range()
ports.extend(r)
- workers = []
+ self.workers = []
+
+ connections = Value('L', 0, lock=True)
for p in ports:
- w = Process(target=self._worker, args=(self._addr, p))
+ w = Process(target=self._worker, args=(self._addr, p, connections, self._closecon))
w.start()
- workers.append(w)
+ self.workers.append(w)
logging.debug("Waiting for workers ...")
- for w in workers:
- w.join()
+ while len(self.workers) > 0:
+ for w in self.workers:
+ try:
+ w.join()
+ except:
+ continue
+ self.workers.remove(w)
+
+ logging.info("Handled %s TCP connections." % connections.value)
+
+ return self.set_pass("Handled %s TCP connections." % connections.value)
11 years, 7 months
[lnst trac] #19: Cleanup fails when some error happens before machines are parsed
by fedora-badges
#19: Cleanup fails when some error happens before machines are parsed
------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: defect | Status: new
Priority: minor | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-----------------------
There's a little bug in the controller cleanup sequence.
If the recipe fails "too early", i. e., before the machines get parsed,
the application fails to do the cleanup, because it cannot find any
configured
machines. See the traceback below:
{{{
06/09 11:59:49| (127.0.0.1)NetTestControll:0302| DEBUG: Exception
raised during recipe parsing. Deconfiguring machines.
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: Traceback
(most recent call last):
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"./nettestctl.py", line 165, in <module>
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: main()
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"./nettestctl.py", line 152, in main
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR:
packet_capture))
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"./nettestctl.py", line 80, in get_recipe_result
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR:
res_serializer, packet_capture)
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"./nettestctl.py", line 53, in process_recipe
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: return
nettestctl.run_recipe(packet_capture)
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"/home/rpazdera/work/lnst-readonly-clean/NetTest/NetTestController.py",
line 375, in run_recipe
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR:
self._prepare()
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"/home/rpazdera/work/lnst-readonly-clean/NetTest/NetTestController.py",
line 304, in _prepare
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR:
self._deconfigure_slaves()
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: File
"/home/rpazdera/work/lnst-readonly-clean/NetTest/NetTestController.py",
line 265, in _deconfigure_slaves
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: for
machine_id in self._recipe["machines"]:
06/09 11:59:49| (127.0.0.1) stdio:0000| ERROR: KeyError:
'machines'
}}}
The expected behavior in this case is to skip the machine cleanup, since
no machines were configured yet.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/19>
lnst <http://example.org/>
My example project
11 years, 7 months
[lnst trac] #23: suggestion: wildcards for filenames in recipe attributes
by fedora-badges
#23: suggestion: wildcards for filenames in recipe attributes
-------------------------+-----------------------
Reporter: olichtne | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
Currently we can distribute our recipes into several files by using the
attribute source. While this is very useful and can generally make recipes
more readable, in some cases you can end up with a number of parent
recipes differing in only a few characters in filenames. This can of
course continue recursively and will result in a significant number of
files that are almost the same.
I discussed this with Jirka and the idea behind solving this problem is to
start supporting wildcards for filenames. The implementation also
shouldn't be very complex, but will require some changes that can
potentially break the existing recipes again.
Since using wildcards basically means to use several different files and
therefore recipes, I would first implement support for multiple recipes in
one "parent" file like something we can see in beaker recipes. But this
would require adding a new tag to our XML scheme and therefore breaking
the recipes.
After this part is done implementing support for wildcards should be
fairly easy and resolving a wildcard would be represented by creating new
recipes each containing a different external file. These recipes would
then be parsed sequentially and independently of each other.
Wildcard resolving could be done during preprocessing so I imagine this
could be added in later when the preprocessor for machine pools is
finished.
This feature would also benefit greatly from the other suggestion to
improve summary reports.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/23>
lnst <http://example.org/>
My example project
11 years, 7 months