[PATCH] recipes: update virtual_bridge_2_vlans_over_bond test
by Jiri Prochazka
offload setting gro on gso on tso on tx on rx off was missing,
this patch adds it
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
.../phase1/virtual_bridge_2_vlans_over_bond.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index e2a9449..59a2dad 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -32,11 +32,12 @@ g4.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
# TESTS
# ------
-offloads = ["gro", "gso", "tso", "tx"]
-offload_settings = [ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on")],
- [("gro", "off"), ("gso", "on"), ("tso", "on"), ("tx", "on")],
- [("gro", "on"), ("gso", "off"), ("tso", "off"), ("tx", "on")],
- [("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off")]]
+offloads = ["gro", "gso", "tso", "tx", "rx"]
+offload_settings = [ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "on")],
+ [("gro", "off"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "on")],
+ [("gro", "on"), ("gso", "off"), ("tso", "off"), ("tx", "on"), ("rx", "on")],
+ [("gro", "on"), ("gso", "on"), ("tso", "off"), ("tx", "off"), ("rx", "on")],
+ [("gro", "on"), ("gso", "on"), ("tso", "on"), ("tx", "on"), ("rx", "off")]]
ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
--
2.4.11
7 years, 8 months
[PATCH] lnst-ctl: fix int params in list_pools action
by Jiri Prochazka
When SlaveMachine param was entered as int, lnst-ctl list_pools action
would fail on concatenating str and int object. This patch fixes that by
retyping the value to str type.
This behaviour was added for SlaveMachine params, network and interface
params.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst-ctl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl
index c4146b0..42ab022 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -98,15 +98,16 @@ def list_pools(restrict_pools, verbose):
out += 3*" " + filename + ".xml\n"
out += 5*" " + "params:\n"
for key in pool['params']:
- out += 7*" " + key + " : " + pool['params'][key] + "\n"
+ out += 7*" " + key + " : " +\
+ str(pool['params'][key]) + "\n"
if pool['interfaces']:
out += 5*" " + "interfaces:\n"
for key in sorted(pool['interfaces']):
out += 7*" " + "id : " + key + "\tlabel : " +\
- pool['interfaces'][key]['network'] + "\n"
+ str(pool['interfaces'][key]['network']) + "\n"
for param in pool['interfaces'][key]['params']:
out += 9*" " + param + " : " +\
- pool['interfaces'][key]['params'][param] + "\n"
+ str(pool['interfaces'][key]['params'][param]) + "\n"
out += "\n"
# print wihout newlines on the end of string
if verbose:
--
2.4.11
7 years, 8 months
[PATCH v2 1/4] Config: add info about version in config
by Jiri Prochazka
The are two types of versions - LNST Major Version and git HEAD commit
hash. LNST Major Version is used when LNST is installed and run from
RPM and git commit hash is used when LNST is run from devel git repo.
LNSTMajorVersion variable in Config.py will have to be manully
incremented each time new release is made.
Used version is stored in Config.version attribute.
Getting git HEAD commit hash is done in following steps:
1) Save cwd
2) Change cwd to directory where Config.py file is located
3) Try running git rev-parse HEAD, which returns commit hash
4) If git command execution was successful, use hash as version
5) Else use value of LNSTMajorVersion as version
6) Return to original working directory
If we didn't change cwd, we would have problems with running LNST installed
from RPM in any git repo folder.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Common/Config.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 31481b2..7b4d17e 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -13,12 +13,15 @@ olichtne(a)redhat.com (Ondrej Lichtner)
import os
import sys
import re
+import subprocess
from lnst.Common.Utils import bool_it
from lnst.Common.NetUtils import verify_mac_address
from lnst.Common.Colours import get_preset_conf
DefaultRPCPort = 9999
+LNSTMajorVersion = '11'
+
class ConfigError(Exception):
pass
@@ -28,6 +31,21 @@ class Config():
def __init__(self):
self._options = dict()
+ self.version = self._get_version()
+
+ def _get_version(self):
+ # Check if I'm in git
+ try:
+ cwd = os.getcwd()
+ abspath = os.path.abspath(__file__)
+ dname = os.path.dirname(abspath)
+ os.chdir(dname)
+ head = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
+ return head
+ except subprocess.CalledProcessError:
+ return LNSTMajorVersion
+ finally:
+ os.chdir(cwd)
def controller_init(self):
self._options['environment'] = dict()
--
2.4.11
7 years, 8 months
[PATCH] recipes: add machine_type parameter to virtual regression
tests
by Jan Tluka
This patch adds explicit requirement for baremetal machines. This fixes
problems with matching when a baremetal machine becomes unavailable and
virtual machine from the pool is selected in the match instead.
Note that this requires adding the same parameter to slavemachine pool.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml | 6 ++++++
recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml | 6 ++++++
.../regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml | 6 ++++++
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml | 6 ++++++
4 files changed, 24 insertions(+)
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
index 33a1ae7..6aba6f8 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
@@ -15,6 +15,9 @@
</define>
<network>
<host id="host1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<eth id="tap" label="to_guest" />
@@ -51,6 +54,9 @@
</interfaces>
</host>
<host id="host2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<vlan id="vlan10">
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
index 48884d5..27583ac 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
@@ -15,6 +15,9 @@
</define>
<network>
<host id="host1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<eth id="tap" label="to_guest" />
@@ -51,6 +54,9 @@
</interfaces>
</host>
<host id="host2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<vlan id="vlan10">
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
index 28fce58..020b9a3 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
@@ -14,6 +14,9 @@
</define>
<network>
<host id="host1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<eth id="tap" label="to_guest" />
@@ -47,6 +50,9 @@
</interfaces>
</host>
<host id="host2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch" />
<vlan id="vlan10">
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
index 8222f13..2715c0d 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
@@ -14,6 +14,9 @@
</define>
<network>
<host id="host1">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch"/>
<eth id="tap" label="to_guest"/>
@@ -44,6 +47,9 @@
</interfaces>
</host>
<host id="host2">
+ <params>
+ <param name="machine_type" value="baremetal"/>
+ </params>
<interfaces>
<eth id="nic" label="to_switch">
</eth>
--
2.4.11
7 years, 8 months
[PATCH 1/3] Task: accept False bg value
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
If the 'bg' parameter was specified with value False the task would
crash with "Argument not recognised", causing problems when the value is
passed as a variable. This commit fixes that by parsing and ignoring the
'bg' argument when it's value is False.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index 51a0333..178d774 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -254,6 +254,8 @@ class HostAPI(object):
if arg == "bg" and argval == True:
self._bg_id_seq += 1
cmd["bg_id"] = bg_id = self._bg_id_seq
+ elif arg == "bg" and argval == False:
+ continue
elif arg == "expect":
if str(argval) not in ["pass", "fail"]:
msg = "Unrecognised value of the expect attribute (%s)." \
--
2.9.0
7 years, 9 months