From 221038f0517719d898b5f9f3173eabfe9aba560a Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 21 Nov 2016 13:59:09 +0000 Subject: ci: Decrease hugepages size for VERIFY&MERGE jobs VSPERF by default requires allocation of hugepages with total size of 10GB. However for MERGE and VERIFY jobs less memory is required and default size of 10GB can cause issues. Thus amount of memory was limited and other minor enhancements were introduced: * sysstat system package is installed at nodes running VERIFY and MERGE jobs * WHITELIST_NICS was set to empty list by default to avoid automatic bind of NICs to DPDK. Old default value could cut off network connection to DUT. * imports were fixed at both integration.py and testcase.py JIRA: VSPERF-391 Change-Id: Ic07d68f4591ae697c1b8edeae6c0cffe47c065ce Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Bill Michalowski Reviewed-by: Antonio Fischetti --- testcases/integration.py | 9 --------- testcases/testcase.py | 13 ++++++++----- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'testcases') diff --git a/testcases/integration.py b/testcases/integration.py index 4b9dacfd..f2a5fecf 100644 --- a/testcases/integration.py +++ b/testcases/integration.py @@ -14,19 +14,10 @@ """IntegrationTestCase class """ -import os -import time import logging -import copy -import re from collections import OrderedDict from testcases import TestCase -from conf import settings as S -from tools import namespace -from tools import veth -from tools.teststepstools import TestStepsTools -from core.loader import Loader class IntegrationTestCase(TestCase): """IntegrationTestCase class diff --git a/testcases/testcase.py b/testcases/testcase.py index 01a07391..18ad4240 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -32,6 +32,9 @@ from core.results.results_constants import ResultsConstants from tools import tasks from tools import hugepages from tools import functions +from tools import namespace +from tools import veth +from tools.teststepstools import TestStepsTools from tools.pkt_gen.trafficgen.trafficgenhelper import TRAFFIC_DEFAULTS CHECK_PREFIX = 'validate_' @@ -176,7 +179,9 @@ class TestCase(object): self._traffic['l2'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L2') self._traffic['l3'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L3') self._traffic['l4'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L4') - elif S.getValue('NICS')[0]['type'] == 'vf' or S.getValue('NICS')[1]['type'] == 'vf': + elif len(S.getValue('NICS')) and \ + (S.getValue('NICS')[0]['type'] == 'vf' or + S.getValue('NICS')[1]['type'] == 'vf'): mac1 = S.getValue('NICS')[0]['mac'] mac2 = S.getValue('NICS')[1]['mac'] if mac1 and mac2: @@ -278,22 +283,20 @@ class TestCase(object): # cleanup any namespaces created if os.path.isdir('/tmp/namespaces'): - import tools.namespace namespace_list = os.listdir('/tmp/namespaces') if len(namespace_list): self._logger.info('Cleaning up namespaces') for name in namespace_list: - tools.namespace.delete_namespace(name) + namespace.delete_namespace(name) os.rmdir('/tmp/namespaces') # cleanup any veth ports created if os.path.isdir('/tmp/veth'): - import tools.veth veth_list = os.listdir('/tmp/veth') if len(veth_list): self._logger.info('Cleaning up veth ports') for eth in veth_list: port1, port2 = eth.split('-') - tools.veth.del_veth_port(port1, port2) + veth.del_veth_port(port1, port2) os.rmdir('/tmp/veth') def run_report(self): -- cgit 1.2.3-korg