Fix deploy cookied-cicd-pike-dpdk

Change-Id: I658d733fed4a04f38473c295d6404fd781ccd6ae
diff --git a/jobs/pipelines/swarm-bootstrap-salt-cluster-devops.groovy b/jobs/pipelines/swarm-bootstrap-salt-cluster-devops.groovy
index ad1a6b3..7a6daaa 100644
--- a/jobs/pipelines/swarm-bootstrap-salt-cluster-devops.groovy
+++ b/jobs/pipelines/swarm-bootstrap-salt-cluster-devops.groovy
@@ -101,8 +101,9 @@
                     export REPOSITORY_SUITE=${MCP_VERSION}
                     export TEST_GROUP=test_bootstrap_salt
                     py.test -vvv -s -p no:django -p no:ipdb --junit-xml=${xml_report_name} -k \${TEST_GROUP}
-                    sleep 60  # wait for jenkins to start and IO calm down
                 """)
+                // Wait for jenkins to start and IO calm down
+                sleep(60)
 
             } catch (e) {
                   common.printMsg("Saltstack cluster deploy is failed", "purple")
diff --git a/jobs/pipelines/swarm-deploy-cicd.groovy b/jobs/pipelines/swarm-deploy-cicd.groovy
index b6f47ee..58474b9 100644
--- a/jobs/pipelines/swarm-deploy-cicd.groovy
+++ b/jobs/pipelines/swarm-deploy-cicd.groovy
@@ -47,7 +47,7 @@
 
             try {
                 // Install core and cicd
-                stage("Run Jenkins job on salt-master [deploy_openstack:drivetrain]") {
+                stage("Run Jenkins job on salt-master [deploy_openstack:${env.STACK_INSTALL}]") {
                     shared.run_job_on_day01_node(env.STACK_INSTALL, install_timeout)
                 }
 
diff --git a/jobs/pipelines/swarm-deploy-platform.groovy b/jobs/pipelines/swarm-deploy-platform.groovy
index c8dd78b..c854c73 100644
--- a/jobs/pipelines/swarm-deploy-platform.groovy
+++ b/jobs/pipelines/swarm-deploy-platform.groovy
@@ -47,7 +47,7 @@
 
             try {
                 // Install the cluster
-                stage("Run Jenkins job on CICD [deploy_openstack:platform]") {
+                stage("Run Jenkins job on CICD [deploy_openstack:${env.STACK_INSTALL}]") {
                     shared.run_job_on_cicd_nodes(env.STACK_INSTALL, install_timeout)
                 }
 
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index 4a0a134..1c05b12 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -324,7 +324,9 @@
 
 def run_job_on_day01_node(stack_to_install, timeout=2400) {
     // stack_to_install="core,cicd"
+    def common = new com.mirantis.mk.Common()
     def stack = "${stack_to_install}"
+    common.printMsg("Deploy DriveTrain CICD components: ${stack_to_install}", "blue")
     try {
         run_cmd("""\
             export ENV_NAME=${ENV_NAME}
@@ -335,11 +337,12 @@
                 \\\"SALT_MASTER_URL\\\": \\\"\${SALTAPI_URL}\\\",
                 \\\"STACK_INSTALL\\\": \\\"${stack}\\\"
             }\"
-            JOB_PREFIX="[ ${ENV_NAME}/{build_number}:${stack} {time} ] "
+            JOB_PREFIX="[ ${ENV_NAME}/{build_number}:drivetrain {time} ] "
             python ./tcp_tests/utils/run_jenkins_job.py --verbose --job-name=deploy_openstack --job-parameters="\$JOB_PARAMETERS" --job-output-prefix="\$JOB_PREFIX"
         """)
+        // Wait for IO calm down on cluster nodes
+        sleep(60)
     } catch (e) {
-        def common = new com.mirantis.mk.Common()
         common.printMsg("Product job 'deploy_openstack' failed, getting details", "purple")
         def workflow_details=run_cmd_stdout("""\
             . ./tcp_tests/utils/env_salt
@@ -354,7 +357,9 @@
 
 def run_job_on_cicd_nodes(stack_to_install, timeout=2400) {
     // stack_to_install="k8s,calico,stacklight"
+    def common = new com.mirantis.mk.Common()
     def stack = "${stack_to_install}"
+    common.printMsg("Deploy Platform components: ${stack_to_install}", "blue")
     try {
         run_cmd("""\
             export ENV_NAME=${ENV_NAME}
@@ -365,12 +370,12 @@
                 \\\"SALT_MASTER_URL\\\": \\\"\${SALTAPI_URL}\\\",
                 \\\"STACK_INSTALL\\\": \\\"${stack}\\\"
             }\"
-            JOB_PREFIX="[ ${ENV_NAME}/{build_number}:${stack} {time} ] "
+            JOB_PREFIX="[ ${ENV_NAME}/{build_number}:platform {time} ] "
             python ./tcp_tests/utils/run_jenkins_job.py --verbose --job-name=deploy_openstack --job-parameters="\$JOB_PARAMETERS" --job-output-prefix="\$JOB_PREFIX"
-            sleep 60  # Wait for IO calm down on cluster nodes
         """)
+        // Wait for IO calm down on cluster nodes
+        sleep(60)
     } catch (e) {
-        def common = new com.mirantis.mk.Common()
         common.printMsg("Product job 'deploy_openstack' failed, getting details", "purple")
         def workflow_details=run_cmd_stdout("""\
             . ./tcp_tests/utils/env_salt
diff --git a/tcp_tests/managers/execute_commands.py b/tcp_tests/managers/execute_commands.py
index e9b7d12..dda95d2 100644
--- a/tcp_tests/managers/execute_commands.py
+++ b/tcp_tests/managers/execute_commands.py
@@ -133,10 +133,10 @@
                 if x == 1 and skip_fail is False:
                     # In the last retry iteration, raise an exception
                     raise Exception("Step '{0}' failed:\n"
-                                    "=======================================\n"
-                                    "STDOUT: {1}\n"
-                                    "=======================================\n"
-                                    "STDERR: {2}\n"
+                                    "=============== STDOUT: ===============\n"
+                                    "{1}\n"
+                                    "=============== STDERR: ===============\n"
+                                    "{2}\n"
                                     .format(description,
                                             result.stdout_str,
                                             result.stderr_str))
diff --git a/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml b/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
index 47fa2ea..ae2e235 100644
--- a/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
+++ b/tcp_tests/templates/cookied-cicd-pike-dpdk/salt.yaml
@@ -18,15 +18,17 @@
   retry: {count: 1, delay: 10}
   skip_fail: false
 
-- description: "Workaround to avoid reboot cmp nodes: bring OVS interfaces UP (PROD-24343)"
+- description: "Workaround to avoid reboot cmp nodes: apply patch to bring OVS interfaces UP (PROD-24343)"
   cmd: |
-    salt 'cmp*' cmd.run "ifup br-prv";
-    salt 'cmp*' cmd.run "ip l set up br-floating";
+    set -ex
+    git clone https://gerrit.mcp.mirantis.com/salt-formulas/linux /root/salt-formula-linux
+    cd /root/salt-formula-linux
+    git fetch https://gerrit.mcp.mirantis.com/salt-formulas/linux refs/changes/32/29432/11 && git checkout FETCH_HEAD
+    cp -r /root/salt-formula-linux/linux/ /srv/salt/env/prd/
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 10}
   skip_fail: false
 
-
 {{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
 
 {{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}