Enable DPDK in tests preparation for correct flavor creation

Change set vcpu_pinning to wider because 1 cpu is not enough for example
if we boot 2 VMs.

Changed roles for gtw node to be able to use external network and vxlan
in case of DPDK.

Remove cinder volume from ctl nodes.

Change dpdk_lcore_mask to use vcpus from both NUMAs (In case of 2 NUMAs
enabled on virtual machine, we are not able to determine wich NUMA our
interfaces belong to. The dpdk_lcore_cpus should be used exactly from
NUMA wich interface belongs to)

Change pmd-cpu-mask to use vcpus which are not intersect with nova
pinned cpus and cpus from lcore mask.

Change compute_ovs_dpdk_socket_mem to use memory from both NUMAs
(because we have 2 NUMAs in our computes)

Change-Id: Ic8e7704473e396f181524571f2b0d8826046610b
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index d406b6e..5abb84e 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -253,8 +253,10 @@
                 'cmd': ("set -ex;" +
                         salt_call_cmd + " cmd.run "
                         " '. /root/keystonercv3;"
+                        "  openstack flavor set m1.extra_tiny_test"
+                        "  --property hw:mem_page_size=any;"
                         "  openstack flavor set m1.tiny_test"
-                        "  --property hw:mem_page_size=small'")},
+                        "  --property hw:mem_page_size=any'")},
             )
 
         self.__salt_api.execute_commands(commands=commands,
diff --git a/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-cookiecutter-pike-ovs-dpdk.yaml b/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-cookiecutter-pike-ovs-dpdk.yaml
index 4fdad27..725ff1c 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-cookiecutter-pike-ovs-dpdk.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-cookiecutter-pike-ovs-dpdk.yaml
@@ -95,7 +95,7 @@
   openstack_nfv_sriov_enabled: 'False'
   openstack_nova_compute_hugepages_count: '2048'
   openstack_nova_compute_nfv_req_enabled: 'False'
-  openstack_nova_cpu_pinning: '3'
+  openstack_nova_cpu_pinning: '4,5,8,9,10,11'
   openstack_ovs_dvr_enabled: 'False'
   openstack_ovs_encapsulation_type: vxlan
   openstack_proxy_address: 172.16.10.80
diff --git a/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-environment.yaml b/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-environment.yaml
index 53fdd68..0cd60ba 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-environment.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dpdk/_context-environment.yaml
@@ -158,7 +158,10 @@
         ens4:
           role: single_ctl
         ens5:
-          role: single_ovs_br_prv
-          mtu: 1500
+          role: bond0_ab_ovs_vxlan_mesh_no_tag
+        ens6:
+          role: bond0_ab_ovs_vxlan_mesh_no_tag
         ens7:
-          role: bond1_ab_ovs_floating
+          role: single_ovs_br_floating
+          external_address: 10.90.0.110
+          external_network_netmask: 255.255.255.0
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
index 5097940..16e97bb 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
@@ -26,7 +26,9 @@
     sed -i '/system.reclass.storage.system.stacklight_log_cluster/d' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml;
 
     # set wider cpu mask for DPDK
-    salt-call reclass.cluster_meta_set name='compute_ovs_dpdk_lcore_mask' value='"0xF"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
+    salt-call reclass.cluster_meta_set name='compute_ovs_dpdk_lcore_mask' value='"0x41"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
+    salt-call reclass.cluster_meta_set name='compute_ovs_pmd_cpu_mask' value='"0xe"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
+    salt-call reclass.cluster_meta_set name='compute_ovs_dpdk_socket_mem' value='"512,512"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
     salt-call reclass.cluster_meta_set name='compute_hugepages_size' value='"2M"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
     salt-call reclass.cluster_meta_set name='compute_hugepages_mount' value='"/mnt/hugepages_2M"' file_name=/srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/init.yml
 
@@ -40,6 +42,14 @@
   retry: {count: 1, delay: 5}
   skip_fail: false
 
+- description: Temporary workaround for removing cinder-volume from CTL nodes
+  cmd: |
+    sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml;
+    sed -i 's/\-\ system\.cinder\.volume\.notification\.messagingv2//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml;
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: true
+
 - description: "Workaround for combined roles: remove unnecessary classes"
   cmd: |
     cat << 'EOF' >> /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/compute/dpdk.yml
diff --git a/tcp_tests/tests/system/test_install_mcp_ovs_pike.py b/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
index 56efe59..98d9498 100644
--- a/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
+++ b/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
@@ -229,7 +229,7 @@
             args='service ntp stop; ntpd -gq; service ntp start')
 
         if settings.RUN_TEMPEST:
-            tempest_actions.prepare_and_run_tempest()
+            tempest_actions.prepare_and_run_tempest(dpdk=True)
         LOG.info("*************** DONE **************")
 
     @pytest.mark.grab_versions