aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-09-18 10:58:37 +0100
committerMartin Klozik <martinx.klozik@intel.com>2017-09-19 08:48:01 +0100
commit39c94c3828af47d8a4c4c090ce0bac6e0566e424 (patch)
treeed0f9f18efd5962831c2d7a2c9407a314a72cf12 /vswitches
parentf2cf028bcb55b868f62fd25c692bd32dd92c27ef (diff)
CI: Update hugepages configuration
Changes introduced by this patch: * Configure more hugepages to be used during CI run. * Fix detection of correct ovs-vswitchd execution. * Skip VPP shutdown overhead in case that VPP execution has failed. Change-Id: Id1badd61334141dcc331691af4a1401a09d06807 Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Diffstat (limited to 'vswitches')
-rw-r--r--vswitches/ovs.py3
-rw-r--r--vswitches/vpp_dpdk_vhost.py19
2 files changed, 12 insertions, 10 deletions
diff --git a/vswitches/ovs.py b/vswitches/ovs.py
index 12620e22..7e16c142 100644
--- a/vswitches/ovs.py
+++ b/vswitches/ovs.py
@@ -48,7 +48,8 @@ class IVSwitchOvs(IVSwitch, tasks.Process):
self._vswitchd_pidfile_path = os.path.join(settings.getValue('TOOLS')['ovs_var_tmp'],
"{}.pid".format(self._proc_name))
self._logger = logging.getLogger(__name__)
- self._expect = r'bridge|INFO|{}'.format(self._proc_name)
+ # sign '|' must be escaped or avoided, otherwise it is handled as 'or' by regex
+ self._expect = r'bridge.INFO.{}'.format(self._proc_name)
self._timeout = 30
self._bridges = {}
self._vswitchd_args = ['--pidfile=' + self._vswitchd_pidfile_path,
diff --git a/vswitches/vpp_dpdk_vhost.py b/vswitches/vpp_dpdk_vhost.py
index 317f3798..2ac70a1a 100644
--- a/vswitches/vpp_dpdk_vhost.py
+++ b/vswitches/vpp_dpdk_vhost.py
@@ -158,16 +158,17 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
Kills ``vpp``
"""
- # try to get VPP pid
- output = self.run_vppctl(['show', 'version', 'verbose'])
- match = re.search(r'Current PID:\s*([0-9]+)', output[0])
- if match:
- vpp_pid = match.group(1)
- tasks.terminate_task(vpp_pid, logger=self._logger)
+ if self.is_running():
+ # try to get VPP pid
+ output = self.run_vppctl(['show', 'version', 'verbose'])
+ match = re.search(r'Current PID:\s*([0-9]+)', output[0])
+ if match:
+ vpp_pid = match.group(1)
+ tasks.terminate_task(vpp_pid, logger=self._logger)
- # in case, that pid was not detected or sudo envelope
- # has not been terminated yet
- tasks.Process.kill(self, signal, sleep)
+ # in case, that pid was not detected or sudo envelope
+ # has not been terminated yet
+ tasks.Process.kill(self, signal, sleep)
def get_version(self):
"""See IVswitch for general description