From: Christos Sfakianakis csfakian@redhat.com
This patch set includes: - ported python recipes [1-9] corresponding to old recipes under /regression/tests/phase2/. - a commit [10] that modifies device naming to better account for tap devices - a commit [11] that modifies lnst/Devices/OvsBridgeDevice and is logically separate from the previous
Christos Sfakianakis (11): lnst.Recipes.ENRT: add TeamRecipe lnst.Recipes.ENRT: add DoubleTeamRecipe lnst.Recipes.ENRT: add TeamVsBondRecipe lnst.Recipes.ENRT: add VlansOverTeamRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlansOverBondRecipe lnst.Recipes.ENRT: update names of guest devices lnst.Devices: modify _type_init of OvsBridgeDevice
lnst/Devices/OvsBridgeDevice.py | 13 +- lnst/Recipes/ENRT/DoubleTeamRecipe.py | 83 ++++++++++ lnst/Recipes/ENRT/TeamRecipe.py | 74 +++++++++ lnst/Recipes/ENRT/TeamVsBondRecipe.py | 87 +++++++++++ ...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 110 +++++++++++++ .../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 89 +++++++++++ ...irtualOvsBridgeVlanInHostMirroredRecipe.py | 102 ++++++++++++ .../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 87 +++++++++++ .../VirtualOvsBridgeVlansOverBondRecipe.py | 147 ++++++++++++++++++ lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 91 +++++++++++ 10 files changed, 871 insertions(+), 12 deletions(-) create mode 100644 lnst/Recipes/ENRT/DoubleTeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamVsBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VlansOverTeamRecipe.py
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe TeamRecipe, implementing old regression_tests/ phase2/{active_backup,round_robin}_team.xml. Its structure is based on previously ported SimplePerfRecipe.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Recipes/ENRT/TeamRecipe.py | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 lnst/Recipes/ENRT/TeamRecipe.py
diff --git a/lnst/Recipes/ENRT/TeamRecipe.py b/lnst/Recipes/ENRT/TeamRecipe.py new file mode 100644 index 0000000..6173ec6 --- /dev/null +++ b/lnst/Recipes/ENRT/TeamRecipe.py @@ -0,0 +1,74 @@ +""" +Implements scenario similar to regression_tests/phase2/ +({active_backup,round_robin}_team.xml + team_test.py) +""" +from lnst.Common.Parameters import Param, IntParam, StrParam +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import TeamDevice + +class TeamRecipe(BaseEnrtRecipe): + m1 = HostReq() + m1.eth1 = DeviceReq(label="tnet") + m1.eth2 = DeviceReq(label="tnet") + + m2 = HostReq() + m2.eth1 = DeviceReq(label="tnet") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on"), + dict(gro="off", gso="on", tso="on", tx="on"), + dict(gro="on", gso="off", tso="off", tx="on"), + dict(gro="on", gso="on", tso="off", tx="off"))) + + runner_name = StrParam(mandatory=True) + + def test_wide_configuration(self): + m1, m2 = self.matched.m1, self.matched.m2 + + m1.eth1.down() + m1.eth2.down() + #The config argument needs to be used with a team device normally (e.g to specify + #the runner mode), but it is not used here due to a bug in the TeamDevice module + m1.team = TeamDevice() + m1.team.slave_add(m1.eth1) + m1.team.slave_add(m1.eth2) + + #EnrtConfiguration and both-side Netperf config need to be checked + configuration = EnrtConfiguration() + configuration.endpoint1 = m1.team + configuration.endpoint2 = m2.eth1 + + if "mtu" in self.params: + m1.team.mtu = self.params.mtu + m2.eth1.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + m1.team.ip_add(ipaddress(net_addr_1 + ".1/24")) + m1.team.ip_add(ipaddress(net_addr6_1 + "::1/64")) + m2.eth1.ip_add(ipaddress(net_addr_1 + ".2/24")) + m2.eth1.ip_add(ipaddress(net_addr6_1 + "::2/64")) + + m1.eth1.up() + m1.eth2.up() + m1.team.up() + m2.eth1.up() + + #TODO better service handling through HostAPI + m1.run("service irqbalance stop") + m2.run("service irqbalance stop") + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + m1, m2 = self.matched.m1, self.matched.m2 + + #TODO better service handling through HostAPI + m1.run("service irqbalance start") + m2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe DoubleTeamRecipe,implementing old regression_tests/ phase2/{active_backup,round_robin}_double_team.xml. Its structure is based on previously ported SimplePerfRecipe.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Recipes/ENRT/DoubleTeamRecipe.py | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 lnst/Recipes/ENRT/DoubleTeamRecipe.py
diff --git a/lnst/Recipes/ENRT/DoubleTeamRecipe.py b/lnst/Recipes/ENRT/DoubleTeamRecipe.py new file mode 100644 index 0000000..54b38de --- /dev/null +++ b/lnst/Recipes/ENRT/DoubleTeamRecipe.py @@ -0,0 +1,83 @@ +""" +Implements scenario similar to regression_tests/phase2/ +({active_backup,round_robin}_double_team.xml + team_test.py) +""" +from lnst.Common.Parameters import Param, IntParam, StrParam +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import TeamDevice + +class DoubleTeamRecipe(BaseEnrtRecipe): + m1 = HostReq() + m1.eth1 = DeviceReq(label="tnet") + m1.eth2 = DeviceReq(label="tnet") + + m2 = HostReq() + m2.eth1 = DeviceReq(label="tnet") + m2.eth2 = DeviceReq(label="tnet") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on"), + dict(gro="off", gso="on", tso="on", tx="on"), + dict(gro="on", gso="off", tso="off", tx="on"), + dict(gro="on", gso="on", tso="off", tx="off"))) + + runner_name = StrParam(mandatory=True) + + def test_wide_configuration(self): + m1, m2 = self.matched.m1, self.matched.m2 + + m1.eth1.down() + m1.eth2.down() + #The config argument needs to be used with a team device normally (e.g to specify + #the runner mode), but it is not used here due to a bug in the TeamDevice module + m1.team = TeamDevice() + m1.team.slave_add(m1.eth1) + m1.team.slave_add(m1.eth2) + + m2.eth1.down() + m2.eth2.down() + m2.team = TeamDevice() + m2.team.slave_add(m2.eth1) + m2.team.slave_add(m2.eth2) + + #EnrtConfiguration and both-side Netperf config need to be checked + configuration = EnrtConfiguration() + configuration.endpoint1 = m1.team + configuration.endpoint2 = m2.team + + if "mtu" in self.params: + m1.team.mtu = self.params.mtu + m2.team.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + m1.team.ip_add(ipaddress(net_addr_1 + ".1/24")) + m1.team.ip_add(ipaddress(net_addr6_1 + "::1/64")) + m2.team.ip_add(ipaddress(net_addr_1 + ".2/24")) + m2.team.ip_add(ipaddress(net_addr6_1 + "::2/64")) + + m1.eth1.up() + m1.eth2.up() + m1.team.up() + m2.eth1.up() + m2.eth2.up() + m2.team.up() + + #TODO better service handling through HostAPI + m1.run("service irqbalance stop") + m2.run("service irqbalance stop") + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + m1, m2 = self.matched.m1, self.matched.m2 + + #TODO better service handling through HostAPI + m1.run("service irqbalance start") + m2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe TeamVsBondRecipe,implementing old regression_tests/ phase2/{active_backup,round_robin}_team_vs_{active_backup,round_robin} _bond.xml. Its structure is based on previously ported SimplePerfRecipe.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Recipes/ENRT/TeamVsBondRecipe.py | 87 +++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 lnst/Recipes/ENRT/TeamVsBondRecipe.py
diff --git a/lnst/Recipes/ENRT/TeamVsBondRecipe.py b/lnst/Recipes/ENRT/TeamVsBondRecipe.py new file mode 100644 index 0000000..597579b --- /dev/null +++ b/lnst/Recipes/ENRT/TeamVsBondRecipe.py @@ -0,0 +1,87 @@ +""" +Implements scenario similar to regression_tests/phase2/ +({active_backup,round_robin}_team_vs_{active_backup,round_robin} +_bond.xml + team_test.py) +""" +from lnst.Common.Parameters import Param, IntParam, StrParam +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import TeamDevice +from lnst.Devices import BondDevice + +class TeamVsBondRecipe(BaseEnrtRecipe): + m1 = HostReq() + m1.eth1 = DeviceReq(label="tnet") + m1.eth2 = DeviceReq(label="tnet") + + m2 = HostReq() + m2.eth1 = DeviceReq(label="tnet") + m2.eth2 = DeviceReq(label="tnet") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on"), + dict(gro="off", gso="on", tso="on", tx="on"), + dict(gro="on", gso="off", tso="off", tx="on"), + dict(gro="on", gso="on", tso="off", tx="off"))) + + runner_name = StrParam(mandatory = True) + bonding_mode = StrParam(mandatory = True) + miimon_value = IntParam(mandatory = True) + + def test_wide_configuration(self): + m1, m2 = self.matched.m1, self.matched.m2 + + m1.eth1.down() + m1.eth2.down() + #The config argument needs to be used with a team device normally (e.g to specify + #the runner mode), but it is not used here due to a bug in the TeamDevice module + m1.team = TeamDevice() + m1.team.slave_add(m1.eth1) + m1.team.slave_add(m1.eth2) + + m2.eth1.down() + m2.eth2.down() + m2.bond = BondDevice(mode=self.params.bonding_mode, miimon=self.params.miimon_value) + m2.bond.slave_add(m2.eth1) + m2.bond.slave_add(m2.eth2) + + #EnrtConfiguration and both-side Netperf config need to be checked + configuration = EnrtConfiguration() + configuration.endpoint1 = m1.team + configuration.endpoint2 = m2.bond + + if "mtu" in self.params: + m1.team.mtu = self.params.mtu + m2.team.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + m1.team.ip_add(ipaddress(net_addr_1 + ".1/24")) + m1.team.ip_add(ipaddress(net_addr6_1 + "::1/64")) + m2.bond.ip_add(ipaddress(net_addr_1 + ".2/24")) + m2.bond.ip_add(ipaddress(net_addr6_1 + "::2/64")) + + m1.eth1.up() + m1.eth2.up() + m1.team.up() + m2.eth1.up() + m2.eth2.up() + m2.bond.up() + + #TODO better service handling through HostAPI + m1.run("service irqbalance stop") + m2.run("service irqbalance stop") + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + m1, m2 = self.matched.m1, self.matched.m2 + + #TODO better service handling through HostAPI + m1.run("service irqbalance start") + m2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VlansOverTeamRecipe,implementing old regression_tests/phase2/3_vlans_over_{active_backup,round_robin} _team.xml. Base it on previously ported SimplePerfRecipe. Use 2 vlans insted of 3.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 91 ++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 lnst/Recipes/ENRT/VlansOverTeamRecipe.py
diff --git a/lnst/Recipes/ENRT/VlansOverTeamRecipe.py b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py new file mode 100644 index 0000000..2e929b8 --- /dev/null +++ b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py @@ -0,0 +1,91 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(3_vlans_over_{active_backup,round_robin}_team.xml + 3_vlans_over_team.py) +""" +from lnst.Common.Parameters import Param, IntParam, StrParam +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import TeamDevice + +class VlansOverTeamRecipe(BaseEnrtRecipe): + m1 = HostReq() + m1.eth1 = DeviceReq(label="tnet") + m1.eth2 = DeviceReq(label="tnet") + + m2 = HostReq() + m2.eth1 = DeviceReq(label="tnet") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on"), + dict(gro="off", gso="on", tso="on", tx="on"), + dict(gro="on", gso="off", tso="off", tx="on"), + dict(gro="on", gso="on", tso="off", tx="off"))) + + runner_name = StrParam(mandatory = True) + + def test_wide_configuration(self): + m1, m2 = self.matched.m1, self.matched.m2 + + m1.eth1.down() + m1.eth2.down() + #The config argument needs to be used with a team device normally (e.g to specify + #the runner mode), but it is not used here due to a bug in the TeamDevice module + m1.team = TeamDevice() + m1.team.slave_add(m1.eth1) + m1.team.slave_add(m1.eth2) + m1.vlan1 = VlanDevice(realdev=m1.team, vlan_id=10) + m1.vlan2 = VlanDevice(realdev=m1.team, vlan_id=20) + + m2.vlan1 = VlanDevice(realdev=m2.eth1, vlan_id=10) + m2.vlan2 = VlanDevice(realdev=m2.eth1, vlan_id=20) + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = m1.vlan1 + configuration.endpoint2 = m2.vlan1 + + if "mtu" in self.params: + for m in (m1, m2): + m.vlan1.mtu = self.params.mtu + m.vlan2.mtu = self.params.mtu + m1.team.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr_2 = "192.168.20" + net_addr6_1 = "fc00:0:0:1" + net_addr6_2 = "fc00:0:0:2" + + m1.team.ip_add(ipaddress("1.2.3.4/24")) + for i, m in enumerate([m1, m2]): + m.vlan1.ip_add(ipaddress(net_addr_1 + "." + str(i+1) + "/24")) + m.vlan1.ip_add(ipaddress(net_addr6_1 + "::" + str(i+1) + "/64")) + m.vlan2.ip_add(ipaddress(net_addr_2 + "." + str(i+1) + "/24")) + m.vlan2.ip_add(ipaddress(net_addr6_2 + "::" + str(i+1) + "/64")) + + m1.eth1.up() + m1.eth2.up() + m1.team.up() + m1.vlan1.up() + m1.vlan2.up() + m2.eth1.up() + m2.vlan1.up() + m2.vlan2.up() + + #TODO better service handling through HostAPI + m1.run("service irqbalance stop") + m2.run("service irqbalance stop") + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + m1, m2 = self.matched.m1, self.matched.m2 + + #TODO better service handling through HostAPI + m1.run("service irqbalance start") + m2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VirtualOvsBridgeVlanInGuestRecipe, implementing old regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml. Base it on previously ported SimplePerfRecipe.
v2: Rename devices that have "to_guest" label. Use 'tap' instead of 'eth'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- .../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py new file mode 100644 index 0000000..041276e --- /dev/null +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py @@ -0,0 +1,89 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(virtual_ovs_bridge_vlan_in_guest.xml + virtual_ovs_bridge_vlan_in_guest.py) +""" +from lnst.Common.Parameters import Param +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import OvsBridgeDevice + +class VirtualOvsBridgeVlanInGuestRecipe(BaseEnrtRecipe): + host1 = HostReq() + host1.eth0 = DeviceReq(label="to_switch") + host1.tap0 = DeviceReq(label="to_guest") + + host2 = HostReq() + host2.eth0 = DeviceReq(label="to_switch") + + guest1 = HostReq() + guest1.tap0 = DeviceReq(label="to_guest") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on", rx="on"), + dict(gro="off", gso="on", tso="on", tx="on", rx="on"), + dict(gro="on", gso="off", tso="off", tx="on", rx="on"), + dict(gro="on", gso="on", tso="off", tx="off", rx="on"), + dict(gro="on", gso="on", tso="on", tx="on", rx="off"))) + + def test_wide_configuration(self): + host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1 + + host1.eth0.down() + host1.tap0.down() + host1.br0 = OvsBridgeDevice() + host1.br0.port_add(host1.eth0) + host1.br0.port_add(host1.tap0) + + host2.eth0.down() + host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id=10) + + guest1.tap0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10) + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = guest1.vlan1 + configuration.endpoint2 = host2.vlan1 + + if "mtu" in self.params: + host1.br0.mtu = self.params.mtu + host2.vlan1.mtu = self.params.mtu + guest1.vlan1.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + host2.vlan1.ip_add(ipaddress(net_addr_1 + ".2/24")) + host2.vlan1.ip_add(ipaddress(net_addr6_1 + "::2/64")) + guest1.vlan1.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.vlan1.ip_add(ipaddress(net_addr6_1 + "::3/64")) + + host1.eth0.up() + host1.tap0.up() + host1.br0.up() + host2.eth0.up() + host2.vlan1.up() + guest1.tap0.up() + guest1.vlan1.up() + + #TODO better service handling through HostAPI + host1.run("service irqbalance stop") + host2.run("service irqbalance stop") + guest1.run("service irqbalance stop") + + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1 + + #TODO better service handling through HostAPI + host1.run("service irqbalance start") + host2.run("service irqbalance start") + guest1.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VirtualOvsBridgeVlanInHostRecipe, implementing old regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml. Base it on previously ported SimplePerfRecipe.
v2: Rename devices that have "to_guest" label. Use 'tap' instead of 'eth'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- .../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py new file mode 100644 index 0000000..aadd304 --- /dev/null +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py @@ -0,0 +1,87 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(virtual_ovs_bridge_vlan_in_host.xml + virtual_ovs_bridge_vlan_in_host.py) +""" +from lnst.Common.Parameters import Param +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import OvsBridgeDevice + +class VirtualOvsBridgeVlanInHostRecipe(BaseEnrtRecipe): + host1 = HostReq() + host1.eth0 = DeviceReq(label="to_switch") + host1.tap0 = DeviceReq(label="to_guest") + + host2 = HostReq() + host2.eth0 = DeviceReq(label="to_switch") + + guest1 = HostReq() + guest1.tap0 = DeviceReq(label="to_guest") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on", rx="on"), + dict(gro="off", gso="on", tso="on", tx="on", rx="on"), + dict(gro="on", gso="off", tso="off", tx="on", rx="on"), + dict(gro="on", gso="on", tso="off", tx="off", rx="on"), + dict(gro="on", gso="on", tso="on", tx="on", rx="off"))) + + def test_wide_configuration(self): + host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1 + + host1.eth0.down() + host1.tap0.down() + host1.br0 = OvsBridgeDevice() + host1.br0.port_add(host1.eth0) + host1.br0.port_add(host1.tap0, tag="10") + + host2.eth0.down() + host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id="10") + + guest1.tap0.down() + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = host2.vlan1 + configuration.endpoint2 = guest1.tap0 + + if "mtu" in self.params: + host1.br0.mtu = self.params.mtu + host2.vlan1.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + host2.vlan1.ip_add(ipaddress(net_addr_1 + ".2/24")) + host2.vlan1.ip_add(ipaddress(net_addr6_1 + "::2/64")) + guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + + host1.eth0.up() + host1.tap0.up() + host1.br0.up() + host2.eth0.up() + host2.vlan1.up() + guest1.tap0.up() + + #TODO better service handling through HostAPI + host1.run("service irqbalance stop") + host2.run("service irqbalance stop") + guest1.run("service irqbalance stop") + + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1 + + #TODO better service handling through HostAPI + host1.run("service irqbalance start") + host2.run("service irqbalance start") + guest1.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VirtualOvsBridgeVlanInGuestMirroredRecipe, implementing old regression_tests/phase2/virtual_ovs_bridge_vlan _in_guest_mirrored.xml. Base it on previously ported SimplePerfRecipe.
v2: Rename devices that have "to_guest" label. Use 'tap' instead of 'eth'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- ...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py new file mode 100644 index 0000000..acb5922 --- /dev/null +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py @@ -0,0 +1,110 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(virtual_ovs_bridge_vlan_in_guest_mirrored.xml + virtual_ovs_bridge_vlan_in_guest_mirrored.py +) +""" +from lnst.Common.Parameters import Param +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import OvsBridgeDevice + +class VirtualOvsBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): + host1 = HostReq() + host1.eth1 = DeviceReq(label="to_switch") + host1.tap0 = DeviceReq(label="to_guest1") + + host2 = HostReq() + host2.eth1 = DeviceReq(label="to_switch") + host2.tap0 = DeviceReq(label="to_guest2") + + guest1 = HostReq() + guest1.tap0 = DeviceReq(label="to_guest1") + + guest2 = HostReq() + guest2.tap0 = DeviceReq(label="to_guest2") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on", rx="on"), + dict(gro="off", gso="on", tso="on", tx="on", rx="on"), + dict(gro="on", gso="off", tso="off", tx="on", rx="on"), + dict(gro="on", gso="on", tso="off", tx="off", rx="on"), + dict(gro="on", gso="on", tso="on", tx="on", rx="off"))) + + def test_wide_configuration(self): + host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2 + + host1.eth1.down() + host1.tap0.down() + host1.br0 = OvsBridgeDevice() + for m, d in [(host1, host1.eth1), (host1, host1.tap0)]: + m.br0.port_add(d) + + host2.eth1.down() + host2.tap0.down() + host2.br0 = OvsBridgeDevice() + for m, d in [(host2, host2.eth1), (host2, host2.tap0)]: + if d.master != None: + if "ovs" not in d.master.name: + m.br0.port_add(d) + else: + m.br0.port_add(d) + + guest1.tap0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10) + + guest2.tap0.down() + guest2.vlan1 = VlanDevice(realdev=guest2.tap0, vlan_id=10) + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = guest1.vlan1 + configuration.endpoint2 = guest2.vlan1 + + if "mtu" in self.params: + host1.br0.mtu = self.params.mtu + host2.br0.mtu = self.params.mtu + guest1.vlan1.mtu = self.params.mtu + guest2.vlan1.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + guest1.vlan1.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.vlan1.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest2.vlan1.ip_add(ipaddress(net_addr_1 + ".4/24")) + guest2.vlan1.ip_add(ipaddress(net_addr6_1 + "::4/64")) + + host1.eth1.up() + host1.tap0.up() + host1.br0.up() + host2.eth1.up() + host2.tap0.up() + host2.br0.up() + guest1.tap0.up() + guest1.vlan1.up() + guest2.tap0.up() + guest2.vlan1.up() + + #TODO better service handling through HostAPI + host1.run("service irqbalance stop") + host2.run("service irqbalance stop") + guest1.run("service irqbalance stop") + guest2.run("service irqbalance stop") + + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2 + + #TODO better service handling through HostAPI + host1.run("service irqbalance start") + host2.run("service irqbalance start") + guest1.run("service irqbalance start") + guest2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VirtualOvsBridgeVlanInHostMirroredRecipe, implementing old regression_tests/phase2/virtual_ovs_bridge_vlan _in_host_mirrored.xml. Base it on previously ported SimplePerfRecipe.
v2: Rename devices that have "to_guest" label. Use 'tap' instead of 'eth'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- ...irtualOvsBridgeVlanInHostMirroredRecipe.py | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py new file mode 100644 index 0000000..e5f90ad --- /dev/null +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py @@ -0,0 +1,102 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(virtual_ovs_bridge_vlan_in_host_mirrored.xml + virtual_ovs_bridge_vlan_in_host_mirrored.py +) +""" +from lnst.Common.Parameters import Param +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import OvsBridgeDevice + +class VirtualOvsBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): + host1 = HostReq() + host1.eth1 = DeviceReq(label="to_switch") + host1.tap0 = DeviceReq(label="to_guest1") + + host2 = HostReq() + host2.eth1 = DeviceReq(label="to_switch") + host2.tap0 = DeviceReq(label="to_guest2") + + guest1 = HostReq() + guest1.tap0 = DeviceReq(label="to_guest1") + + guest2 = HostReq() + guest2.tap0 = DeviceReq(label="to_guest2") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on", rx="on"), + dict(gro="off", gso="on", tso="on", tx="on", rx="on"), + dict(gro="on", gso="off", tso="off", tx="on", rx="on"), + dict(gro="on", gso="on", tso="off", tx="off", rx="on"), + dict(gro="on", gso="on", tso="on", tx="on", rx="off"))) + + def test_wide_configuration(self): + host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2 + + host1.eth1.down() + host1.tap0.down() + host1.br0 = OvsBridgeDevice() + host1.br0.port_add(host1.eth1) + host1.br0.port_add(host1.tap0, tag="10") + + host2.eth1.down() + host2.tap0.down() + host2.br0 = OvsBridgeDevice() + host2.br0.port_add(host2.eth1) + host2.br0.port_add(host2.tap0, tag="10") + + guest1.tap0.down() + + guest2.tap0.down() + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = guest1.tap0 + configuration.endpoint2 = guest2.tap0 + + if "mtu" in self.params: + host1.br0.mtu = self.params.mtu + host2.br0.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu + guest2.tap0.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + + guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest2.tap0.ip_add(ipaddress(net_addr_1 + ".4/24")) + guest2.tap0.ip_add(ipaddress(net_addr6_1 + "::4/64")) + + host1.eth1.up() + host1.tap0.up() + host1.br0.up() + host2.eth1.up() + host2.tap0.up() + host2.br0.up() + guest1.tap0.up() + guest2.tap0.up() + + #TODO better service handling through HostAPI + host1.run("service irqbalance stop") + host2.run("service irqbalance stop") + guest1.run("service irqbalance stop") + guest2.run("service irqbalance stop") + + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2 + + #TODO better service handling through HostAPI + host1.run("service irqbalance start") + host2.run("service irqbalance start") + guest1.run("service irqbalance start") + guest2.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Add ported recipe VirtualOvsBridgeVlansOverBondRecipe, implementing old regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_ backup_bond.xml. Base it on previously ported SimplePerfRecipe. Add bond mode as parameter.
v2: Rename devices that have "to_guest" label. Use 'tap' instead of 'eth'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- .../VirtualOvsBridgeVlansOverBondRecipe.py | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py new file mode 100644 index 0000000..1719161 --- /dev/null +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py @@ -0,0 +1,147 @@ +""" +Implements scenario similar to regression_tests/phase2/ +(virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml + +virtual_ovs_bridge_2_vlans_over_active_backup_bond.py +) +""" +from lnst.Common.Parameters import Param, IntParam, StrParam +from lnst.Common.IpAddress import ipaddress +from lnst.Controller import HostReq, DeviceReq +from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe, EnrtConfiguration +from lnst.Devices import VlanDevice +from lnst.Devices import OvsBridgeDevice + +class VirtualOvsBridgeVlansOverBondRecipe(BaseEnrtRecipe): + host1 = HostReq() + host1.eth1 = DeviceReq(label="to_switch") + host1.eth2 = DeviceReq(label="to_switch") + host1.tap0 = DeviceReq(label="to_guest1") + host1.tap1 = DeviceReq(label="to_guest2") + + host2 = HostReq() + host2.eth1 = DeviceReq(label="to_switch") + host2.eth2 = DeviceReq(label="to_switch") + host2.tap0 = DeviceReq(label="to_guest3") + host2.tap1 = DeviceReq(label="to_guest4") + + guest1 = HostReq() + guest1.tap0 = DeviceReq(label="to_guest1") + + guest2 = HostReq() + guest2.tap0 = DeviceReq(label="to_guest2") + + guest3 = HostReq() + guest3.tap0 = DeviceReq(label="to_guest3") + + guest4 = HostReq() + guest4.tap0 = DeviceReq(label="to_guest4") + + offload_combinations = Param(default=( + dict(gro="on", gso="on", tso="on", tx="on"), + dict(gro="off", gso="on", tso="on", tx="on"), + dict(gro="on", gso="off", tso="off", tx="on"), + dict(gro="on", gso="on", tso="off", tx="off"))) + + bonding_mode = StrParam(mandatory = True) + miimon_value = IntParam(mandatory = True) + + def test_wide_configuration(self): + host1, host2, guest1, guest2, guest3, guest4 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2, self.matched.guest3, self.matched.guest4 + + host1.eth1.down() + host1.eth2.down() + host1.tap0.down() + host1.tap1.down() + host1.br0 = OvsBridgeDevice() + for d, tag in [(host1.tap0, "10"), (host1.tap1, "20")]: + host1.br0.port_add(d, tag=tag) + + #miimon cannot be set due to colon in argument name --> other_config:bond-miimon-interval + #https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/... + host1.br0.bond_add("bond_host1", (host1.eth1, host1.eth2), bond_mode=self.params.bonding_mode) + + host2.eth1.down() + host2.eth2.down() + host2.tap0.down() + host2.tap1.down() + host2.br0 = OvsBridgeDevice() + + for d, tag in [(host2.tap0, "10"), (host2.tap1, "20")]: + host2.br0.port_add(d, tag=tag) + + host2.br0.bond_add("bond_host2", (host2.eth1, host2.eth2), bond_mode=self.params.bonding_mode) + + guest1.tap0.down() + + guest2.tap0.down() + + guest3.tap0.down() + + guest4.tap0.down() + + #Due to limitations in the current EnrtConfiguration + #class, a single vlan test pair is chosen + configuration = EnrtConfiguration() + configuration.endpoint1 = guest1.tap0 + configuration.endpoint2 = guest3.tap0 + + if "mtu" in self.params: + host1.br0.mtu = self.params.mtu + host2.br0.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu + guest2.tap0.mtu = self.params.mtu + guest3.tap0.mtu = self.params.mtu + guest4.tap0.mtu = self.params.mtu + + net_addr_1 = "192.168.10" + net_addr6_1 = "fc00:0:0:1" + net_addr_2 = "192.168.20" + net_addr6_2 = "fc00:0:0:2" + + for i, m in enumerate([guest1, guest3]): + m.eth0.ip_add(ipaddress(net_addr_1 + "." + str (i+1) + "/24")) + m.eth0.ip_add(ipaddress(net_addr6_1 + "::" + str (i+1) + "/64")) + + for i, m in enumerate([guest2, guest4]): + m.eth0.ip_add(ipaddress(net_addr_2 + "." + str (i+1) + "/24")) + m.eth0.ip_add(ipaddress(net_addr6_2 + "::" + str (i+1) + "/64")) + + host1.eth1.up() + host1.eth2.up() + host1.tap0.up() + host1.tap1.up() + host1.br0.up() + host2.eth1.up() + host2.eth2.up() + host2.tap0.up() + host2.tap1.up() + host2.br0.up() + guest1.tap0.up() + guest2.tap0.up() + guest3.tap0.up() + guest4.tap0.up() + + #TODO better service handling through HostAPI + host1.run("service irqbalance stop") + host2.run("service irqbalance stop") + guest1.run("service irqbalance stop") + guest2.run("service irqbalance stop") + guest3.run("service irqbalance stop") + guest4.run("service irqbalance stop") + + for m in self.matched: + for dev in m.devices: + self._pin_dev_interrupts(dev, self.params.dev_intr_cpu) + + return configuration + + def test_wide_deconfiguration(self, config): + host1, host2, guest1, guest2, guest3, guest4 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2, self.matched.guest3, self.matched.guest4 + + #TODO better service handling through HostAPI + host1.run("service irqbalance start") + host2.run("service irqbalance start") + guest1.run("service irqbalance start") + guest2.run("service irqbalance start") + guest3.run("service irqbalance start") + guest4.run("service irqbalance start")
From: Christos Sfakianakis csfakian@redhat.com
Remove 'tap' names from guest machines (they are 'eth' from their point of view) in VirtualOvsBridge* recipes.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- ...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 16 ++++----- .../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 8 ++--- ...irtualOvsBridgeVlanInHostMirroredRecipe.py | 28 +++++++-------- .../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 14 ++++---- .../VirtualOvsBridgeVlansOverBondRecipe.py | 36 +++++++++---------- 5 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py index acb5922..c77e03a 100644 --- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py @@ -20,10 +20,10 @@ class VirtualOvsBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host2.tap0 = DeviceReq(label="to_guest2")
guest1 = HostReq() - guest1.tap0 = DeviceReq(label="to_guest1") + guest1.eth0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.tap0 = DeviceReq(label="to_guest2") + guest2.eth0 = DeviceReq(label="to_guest2")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -51,11 +51,11 @@ class VirtualOvsBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): else: m.br0.port_add(d)
- guest1.tap0.down() - guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10) + guest1.eth0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.eth0, vlan_id=10)
- guest2.tap0.down() - guest2.vlan1 = VlanDevice(realdev=guest2.tap0, vlan_id=10) + guest2.eth0.down() + guest2.vlan1 = VlanDevice(realdev=guest2.eth0, vlan_id=10)
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen @@ -83,9 +83,9 @@ class VirtualOvsBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host2.eth1.up() host2.tap0.up() host2.br0.up() - guest1.tap0.up() + guest1.eth0.up() guest1.vlan1.up() - guest2.tap0.up() + guest2.eth0.up() guest2.vlan1.up()
#TODO better service handling through HostAPI diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py index 041276e..a681355 100644 --- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py @@ -18,7 +18,7 @@ class VirtualOvsBridgeVlanInGuestRecipe(BaseEnrtRecipe): host2.eth0 = DeviceReq(label="to_switch")
guest1 = HostReq() - guest1.tap0 = DeviceReq(label="to_guest") + guest1.eth0 = DeviceReq(label="to_guest")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -39,8 +39,8 @@ class VirtualOvsBridgeVlanInGuestRecipe(BaseEnrtRecipe): host2.eth0.down() host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id=10)
- guest1.tap0.down() - guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10) + guest1.eth0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.eth0, vlan_id=10)
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen @@ -66,7 +66,7 @@ class VirtualOvsBridgeVlanInGuestRecipe(BaseEnrtRecipe): host1.br0.up() host2.eth0.up() host2.vlan1.up() - guest1.tap0.up() + guest1.eth0.up() guest1.vlan1.up()
#TODO better service handling through HostAPI diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py index e5f90ad..7b640b8 100644 --- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py @@ -20,10 +20,10 @@ class VirtualOvsBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): host2.tap0 = DeviceReq(label="to_guest2")
guest1 = HostReq() - guest1.tap0 = DeviceReq(label="to_guest1") + guest1.eth0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.tap0 = DeviceReq(label="to_guest2") + guest2.eth0 = DeviceReq(label="to_guest2")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -47,29 +47,29 @@ class VirtualOvsBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): host2.br0.port_add(host2.eth1) host2.br0.port_add(host2.tap0, tag="10")
- guest1.tap0.down() + guest1.eth0.down()
- guest2.tap0.down() + guest2.eth0.down()
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen configuration = EnrtConfiguration() - configuration.endpoint1 = guest1.tap0 - configuration.endpoint2 = guest2.tap0 + configuration.endpoint1 = guest1.eth0 + configuration.endpoint2 = guest2.eth0
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host2.br0.mtu = self.params.mtu - guest1.tap0.mtu = self.params.mtu - guest2.tap0.mtu = self.params.mtu + guest1.eth0.mtu = self.params.mtu + guest2.eth0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr6_1 = "fc00:0:0:1"
- guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) - guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64")) - guest2.tap0.ip_add(ipaddress(net_addr_1 + ".4/24")) - guest2.tap0.ip_add(ipaddress(net_addr6_1 + "::4/64")) + guest1.eth0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.eth0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest2.eth0.ip_add(ipaddress(net_addr_1 + ".4/24")) + guest2.eth0.ip_add(ipaddress(net_addr6_1 + "::4/64"))
host1.eth1.up() host1.tap0.up() @@ -77,8 +77,8 @@ class VirtualOvsBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): host2.eth1.up() host2.tap0.up() host2.br0.up() - guest1.tap0.up() - guest2.tap0.up() + guest1.eth0.up() + guest2.eth0.up()
#TODO better service handling through HostAPI host1.run("service irqbalance stop") diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py index aadd304..9b3dd10 100644 --- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py @@ -18,7 +18,7 @@ class VirtualOvsBridgeVlanInHostRecipe(BaseEnrtRecipe): host2.eth0 = DeviceReq(label="to_switch")
guest1 = HostReq() - guest1.tap0 = DeviceReq(label="to_guest") + guest1.eth0 = DeviceReq(label="to_guest")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -39,33 +39,33 @@ class VirtualOvsBridgeVlanInHostRecipe(BaseEnrtRecipe): host2.eth0.down() host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id="10")
- guest1.tap0.down() + guest1.eth0.down()
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen configuration = EnrtConfiguration() configuration.endpoint1 = host2.vlan1 - configuration.endpoint2 = guest1.tap0 + configuration.endpoint2 = guest1.eth0
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host2.vlan1.mtu = self.params.mtu - guest1.tap0.mtu = self.params.mtu + guest1.eth0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr6_1 = "fc00:0:0:1"
host2.vlan1.ip_add(ipaddress(net_addr_1 + ".2/24")) host2.vlan1.ip_add(ipaddress(net_addr6_1 + "::2/64")) - guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) - guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest1.eth0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.eth0.ip_add(ipaddress(net_addr6_1 + "::3/64"))
host1.eth0.up() host1.tap0.up() host1.br0.up() host2.eth0.up() host2.vlan1.up() - guest1.tap0.up() + guest1.eth0.up()
#TODO better service handling through HostAPI host1.run("service irqbalance stop") diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py index 1719161..7595dbf 100644 --- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py +++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py @@ -25,16 +25,16 @@ class VirtualOvsBridgeVlansOverBondRecipe(BaseEnrtRecipe): host2.tap1 = DeviceReq(label="to_guest4")
guest1 = HostReq() - guest1.tap0 = DeviceReq(label="to_guest1") + guest1.eth0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.tap0 = DeviceReq(label="to_guest2") + guest2.eth0 = DeviceReq(label="to_guest2")
guest3 = HostReq() - guest3.tap0 = DeviceReq(label="to_guest3") + guest3.eth0 = DeviceReq(label="to_guest3")
guest4 = HostReq() - guest4.tap0 = DeviceReq(label="to_guest4") + guest4.eth0 = DeviceReq(label="to_guest4")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on"), @@ -71,27 +71,27 @@ class VirtualOvsBridgeVlansOverBondRecipe(BaseEnrtRecipe):
host2.br0.bond_add("bond_host2", (host2.eth1, host2.eth2), bond_mode=self.params.bonding_mode)
- guest1.tap0.down() + guest1.eth0.down()
- guest2.tap0.down() + guest2.eth0.down()
- guest3.tap0.down() + guest3.eth0.down()
- guest4.tap0.down() + guest4.eth0.down()
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen configuration = EnrtConfiguration() - configuration.endpoint1 = guest1.tap0 - configuration.endpoint2 = guest3.tap0 + configuration.endpoint1 = guest1.eth0 + configuration.endpoint2 = guest3.eth0
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host2.br0.mtu = self.params.mtu - guest1.tap0.mtu = self.params.mtu - guest2.tap0.mtu = self.params.mtu - guest3.tap0.mtu = self.params.mtu - guest4.tap0.mtu = self.params.mtu + guest1.eth0.mtu = self.params.mtu + guest2.eth0.mtu = self.params.mtu + guest3.eth0.mtu = self.params.mtu + guest4.eth0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr6_1 = "fc00:0:0:1" @@ -116,10 +116,10 @@ class VirtualOvsBridgeVlansOverBondRecipe(BaseEnrtRecipe): host2.tap0.up() host2.tap1.up() host2.br0.up() - guest1.tap0.up() - guest2.tap0.up() - guest3.tap0.up() - guest4.tap0.up() + guest1.eth0.up() + guest2.eth0.up() + guest3.eth0.up() + guest4.eth0.up()
#TODO better service handling through HostAPI host1.run("service irqbalance stop")
From: Christos Sfakianakis csfakian@redhat.com
Use systemd to activate openvswitch and take care of any dependencies. Remove the rest of the code as: - modprobe, ovsdb-server, ovs-vswitchd are covered by systemd - _moduleparams is empty string (modinfo openvswitch)
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Devices/OvsBridgeDevice.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/lnst/Devices/OvsBridgeDevice.py b/lnst/Devices/OvsBridgeDevice.py index d54cf94..ff8232a 100644 --- a/lnst/Devices/OvsBridgeDevice.py +++ b/lnst/Devices/OvsBridgeDevice.py @@ -25,18 +25,7 @@ class OvsBridgeDevice(SoftDevice):
@classmethod def _type_init(cls): - if not cls._type_initialized: - exec_cmd("modprobe %s %s" % ("openvswitch", cls._moduleparams)) - - if not check_process_running("ovsdb-server"): - exec_cmd("mkdir -p /var/run/openvswitch/") - exec_cmd("ovsdb-server --detach --pidfile "\ - "--remote=punix:/var/run/openvswitch/db.sock", - die_on_err=False) - if not check_process_running("ovs-vswitchd"): - exec_cmd("ovs-vswitchd --detach --pidfile", die_on_err=False) - - cls._type_initialized = True + exec_cmd("systemctl start openvswitch.service", die_on_err=False)
def _create(self): exec_cmd("ovs-vsctl add-br %s" % self.name)
Fri, Nov 02, 2018 at 04:27:40PM CET, csfakian@redhat.com wrote:
From: Christos Sfakianakis csfakian@redhat.com
This patch set includes:
- ported python recipes [1-9] corresponding to old recipes under /regression/tests/phase2/.
- a commit [10] that modifies device naming to better account for tap devices
- a commit [11] that modifies lnst/Devices/OvsBridgeDevice and is logically separate from the previous
Christos Sfakianakis (11): lnst.Recipes.ENRT: add TeamRecipe lnst.Recipes.ENRT: add DoubleTeamRecipe lnst.Recipes.ENRT: add TeamVsBondRecipe lnst.Recipes.ENRT: add VlansOverTeamRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlansOverBondRecipe lnst.Recipes.ENRT: update names of guest devices lnst.Devices: modify _type_init of OvsBridgeDevice
lnst/Devices/OvsBridgeDevice.py | 13 +- lnst/Recipes/ENRT/DoubleTeamRecipe.py | 83 ++++++++++ lnst/Recipes/ENRT/TeamRecipe.py | 74 +++++++++ lnst/Recipes/ENRT/TeamVsBondRecipe.py | 87 +++++++++++ ...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 110 +++++++++++++ .../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 89 +++++++++++ ...irtualOvsBridgeVlanInHostMirroredRecipe.py | 102 ++++++++++++ .../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 87 +++++++++++ .../VirtualOvsBridgeVlansOverBondRecipe.py | 147 ++++++++++++++++++ lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 91 +++++++++++ 10 files changed, 871 insertions(+), 12 deletions(-) create mode 100644 lnst/Recipes/ENRT/DoubleTeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamVsBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VlansOverTeamRecipe.py
--
Ack to series.
Acked-by: Jan Tluka jtluka@redhat.com
On Fri, Nov 02, 2018 at 04:27:40PM +0100, csfakian@redhat.com wrote:
From: Christos Sfakianakis csfakian@redhat.com
This patch set includes: - ported python recipes [1-9] corresponding to old recipes under /regression/tests/phase2/. - a commit [10] that modifies device naming to better account for tap devices - a commit [11] that modifies lnst/Devices/OvsBridgeDevice and is logically separate from the previous
Christos Sfakianakis (11): lnst.Recipes.ENRT: add TeamRecipe lnst.Recipes.ENRT: add DoubleTeamRecipe lnst.Recipes.ENRT: add TeamVsBondRecipe lnst.Recipes.ENRT: add VlansOverTeamRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInGuestMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlanInHostMirroredRecipe lnst.Recipes.ENRT: add VirtualOvsBridgeVlansOverBondRecipe lnst.Recipes.ENRT: update names of guest devices lnst.Devices: modify _type_init of OvsBridgeDevice
lnst/Devices/OvsBridgeDevice.py | 13 +- lnst/Recipes/ENRT/DoubleTeamRecipe.py | 83 ++++++++++ lnst/Recipes/ENRT/TeamRecipe.py | 74 +++++++++ lnst/Recipes/ENRT/TeamVsBondRecipe.py | 87 +++++++++++ ...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 110 +++++++++++++ .../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 89 +++++++++++ ...irtualOvsBridgeVlanInHostMirroredRecipe.py | 102 ++++++++++++ .../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 87 +++++++++++ .../VirtualOvsBridgeVlansOverBondRecipe.py | 147 ++++++++++++++++++ lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 91 +++++++++++ 10 files changed, 871 insertions(+), 12 deletions(-) create mode 100644 lnst/Recipes/ENRT/DoubleTeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamRecipe.py create mode 100644 lnst/Recipes/ENRT/TeamVsBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py create mode 100644 lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py create mode 100644 lnst/Recipes/ENRT/VlansOverTeamRecipe.py
-- 2.17.1 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
set pushed, thanks
-Ondrej
lnst-developers@lists.fedorahosted.org