CI: Update hugepages configuration 37/42237/9
authorMartin Klozik <martinx.klozik@intel.com>
Mon, 18 Sep 2017 09:58:37 +0000 (10:58 +0100)
committerMartin Klozik <martinx.klozik@intel.com>
Tue, 19 Sep 2017 07:48:01 +0000 (08:48 +0100)
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>
ci/build-vsperf.sh
vswitches/ovs.py
vswitches/vpp_dpdk_vhost.py

index eaab997..b60a7fa 100755 (executable)
@@ -127,18 +127,23 @@ function terminate_vsperf() {
 #   $1 - directory with results
 function print_results() {
     for i in $TESTCASES ; do
-        RES_FILE=`ls -1 $1 | egrep "result_${i}_[0-9a-zA-Z\-]+.csv"`
-
-        if [ "x$RES_FILE" != "x" -a -e "${1}/${RES_FILE}" ]; then
-            if grep ^FAILED "${1}/${RES_FILE}" &> /dev/null ; then
+        if [ ! -e $1 ] ; then
+            printf "    %-70s %-6s\n" "result_${i}" "FAILED"
+            EXIT=$EXIT_TC_FAILED
+        else
+            RES_FILE=`ls -1 $1 | egrep "result_${i}_[0-9a-zA-Z\-]+.csv"`
+
+            if [ "x$RES_FILE" != "x" -a -e "${1}/${RES_FILE}" ]; then
+                if grep ^FAILED "${1}/${RES_FILE}" &> /dev/null ; then
+                    printf "    %-70s %-6s\n" "result_${i}" "FAILED"
+                    EXIT=$EXIT_TC_FAILED
+                else
+                    printf "    %-70s %-6s\n" "result_${i}" "OK"
+                fi
+            else
                 printf "    %-70s %-6s\n" "result_${i}" "FAILED"
                 EXIT=$EXIT_TC_FAILED
-            else
-                printf "    %-70s %-6s\n" "result_${i}" "OK"
             fi
-        else
-            printf "    %-70s %-6s\n" "result_${i}" "FAILED"
-            EXIT=$EXIT_TC_FAILED
         fi
     done
 }
@@ -423,7 +428,7 @@ function dependencies_check() {
 # configure hugepages
 function configure_hugepages() {
     HP_MAX=8192
-    HP_REQUESTED=2048
+    HP_REQUESTED=3072
     HP_NR=`cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages`
     HP_FREE=`cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/free_hugepages`
     # check if HP must be (re)configured
index 12620e2..7e16c14 100644 (file)
@@ -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,
index 317f379..2ac70a1 100644 (file)
@@ -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