From: Ondrej Lichtner <olichtne(a)redhat.com>
To get the version of the main ovs package while supporting future
openvswitch2.10 and other packages we use the rpm query by file option.
This isn't universal and won't work on distributions with different
package systems, so we also add || true to the command to avoid failures
because of this command.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
.../virtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 5 +++++
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 3 +++
.../phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py | 5 +++++
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 3 +++
.../phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py | 5 +++++
recipes/regression_tests/phase3/2_virt_ovs_vxlan.py | 5 +++++
recipes/regression_tests/phase3/novirt_ovs_vxlan.py | 5 +++++
recipes/regression_tests/phase3/ovs-dpdk-pvp.py | 3 +++
8 files changed, 34 insertions(+)
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index 8c2c77b..574bb53 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -52,6 +52,9 @@ offloads_alias = ctl.get_alias("offloads")
nperf_protocols = ctl.get_alias("nperf_protocols")
official_result = bool_it(ctl.get_alias("official_result"))
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+h2_ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
sctp_default_msg_size = "16K"
if offloads_alias is not None:
@@ -64,6 +67,8 @@ else:
[("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off")]]
pr_comment = generate_perfrepo_comment([h1, g1, g2, h2, g3, g4], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
+pr_comment += "\n<BR/>Host2 OvS rpm version: {}".format(h2_ovs_rpm_version)
h1_nic1 = h1.get_interface("nic1")
h1_nic2 = h1.get_interface("nic2")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
index 6e922f2..7dd083f 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
@@ -58,7 +58,10 @@ else:
[("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
[("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([h1, g1, h2], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
h2_vlan10 = h2.get_interface("vlan10")
g1_vlan10 = g1.get_interface("vlan10")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py
index aeb390e..923674b 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py
@@ -59,7 +59,12 @@ else:
[("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
[("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+h2_ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([h1, g1, h2, g2], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
+pr_comment += "\n<BR/>Host2 OvS rpm version: {}".format(h2_ovs_rpm_version)
g1_vlan10 = g1.get_interface("vlan10")
g2_vlan10 = g2.get_interface("vlan10")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
index a213ea6..0452105 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
@@ -58,7 +58,10 @@ else:
[("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
[("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([h1, g1, h2], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
h2_vlan10 = h2.get_interface("vlan10")
g1_guestnic = g1.get_interface("guestnic")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py
index 634325c..8ef4ba3 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py
@@ -59,7 +59,12 @@ else:
[("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
[("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+h2_ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([h1, g1, h2], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
+pr_comment += "\n<BR/>Host2 OvS rpm version: {}".format(h2_ovs_rpm_version)
g1_guestnic = g1.get_interface("guestnic")
g2_guestnic = g2.get_interface("guestnic")
diff --git a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
index 107d1ae..1d81f65 100644
--- a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
@@ -50,8 +50,13 @@ pr_user_comment = ctl.get_alias("perfrepo_comment")
nperf_protocols = ctl.get_alias("nperf_protocols")
official_result = bool_it(ctl.get_alias("official_result"))
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+h2_ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([guest1, guest2, guest3, guest4],
pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
+pr_comment += "\n<BR/>Host2 OvS rpm version: {}".format(h2_ovs_rpm_version)
g1_nic = guest1.get_interface("if1")
g2_nic = guest2.get_interface("if1")
diff --git a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
index cc3bcd9..37fdffc 100644
--- a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
@@ -44,7 +44,12 @@ pr_user_comment = ctl.get_alias("perfrepo_comment")
nperf_protocols = ctl.get_alias("nperf_protocols")
official_result = bool_it(ctl.get_alias("official_result"))
+h1_ovs_rpm_version = h1.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+h2_ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
pr_comment = generate_perfrepo_comment([h1, h2], pr_user_comment)
+pr_comment += "\n<BR/>Host1 OvS rpm version: {}".format(h1_ovs_rpm_version)
+pr_comment += "\n<BR/>Host2 OvS rpm version: {}".format(h2_ovs_rpm_version)
h1_nic = h1.get_device("int0")
h2_nic = h2.get_device("int0")
diff --git a/recipes/regression_tests/phase3/ovs-dpdk-pvp.py b/recipes/regression_tests/phase3/ovs-dpdk-pvp.py
index 5533f57..b17227c 100644
--- a/recipes/regression_tests/phase3/ovs-dpdk-pvp.py
+++ b/recipes/regression_tests/phase3/ovs-dpdk-pvp.py
@@ -103,6 +103,8 @@ if tmp:
else:
dpdk_version = "unknown"
+ovs_rpm_version = h2.run("rpm -qf `which ovs-vswitchd` || true").get_result()["res_data"]["stdout"]
+
# ------
# TESTS
# ------
@@ -131,6 +133,7 @@ max_dev = ctl.get_alias("max_dev")
pr_comment = generate_perfrepo_comment([h1, h2], pr_user_comment)
pr_comment += "\n<BR>DPDK version: {}".format(dpdk_version)
+pr_comment += "\n<BR/>OvS rpm version: {}".format(ovs_rpm_version)
h1_nic1 = h1.get_interface("if1")
h1_nic2 = h1.get_interface("if2")
--
2.19.1