Fix rabbitmq failover test

Change-Id: Ic4d9ba4f4a58b14990a0f153c0ef1f9d6e2fec01
diff --git a/tcp_tests/managers/rallymanager.py b/tcp_tests/managers/rallymanager.py
index 156e226..5b7fd4c 100644
--- a/tcp_tests/managers/rallymanager.py
+++ b/tcp_tests/managers/rallymanager.py
@@ -46,6 +46,7 @@
         cmd = ("docker images | grep {0}| grep {1}| awk '{{print $3}}'"
                .format(self.image_name, self.image_version))
         res = self._underlay.check_call(cmd, node_name=self._node_name)
+        LOG.debug(res['stdout'])
         image_id = res['stdout'][0].strip()
         LOG.info("Image ID is {}".format(image_id))
         return image_id
diff --git a/tcp_tests/tests/system/test_failover_openstack_services.py b/tcp_tests/tests/system/test_failover_openstack_services.py
index d06c2af..eaa3377 100644
--- a/tcp_tests/tests/system/test_failover_openstack_services.py
+++ b/tcp_tests/tests/system/test_failover_openstack_services.py
@@ -234,7 +234,7 @@
             else:
                 # Check that keepalived on other ctl nodes was not restarted
                 assert ps == ps_after[node_name], (
-                   "Keepalived was restarted while it shouldn't!")
+                    "Keepalived was restarted while it shouldn't!")
 
         # STEP #5
         show_step(5)
@@ -337,7 +337,7 @@
             else:
                 # Check that keepalived on other ctl nodes was not restarted
                 assert ps == ps_after[node_name], (
-                   "Keepalived was restarted while it shouldn't!")
+                    "Keepalived was restarted while it shouldn't!")
         # STEP #5
         show_step(5)
         # TODO(ddmitriev):
@@ -412,8 +412,8 @@
             else:
                 # Check that haproxy on other ctl nodes was not restarted
                 assert ps == ps_after[node_name], (
-                   "Haproxy was restarted while it shouldn't on node {0}"
-                   .format(node_name))
+                    "Haproxy was restarted while it shouldn't on node {0}"
+                    .format(node_name))
 
         # STEP #11
         show_step(11)
@@ -488,7 +488,9 @@
         LOG.info("Scheduling to kill rabbitmq on the minion {0}"
                  .format(ctl_minion))
         underlay.delayed_call(
-            "salt '{0}' cmd.run 'killall -9 -u rabbitmq'".format(ctl_minion),
+            "salt '{0}' cmd.run 'chmod -x "
+            "/usr/lib/rabbitmq/bin/rabbitmq-server "
+            "&& killall -9 -u rabbitmq'".format(ctl_minion),
             host=config.salt.salt_master_host,
             delay_min=2,
             delay_max=3)
@@ -499,6 +501,8 @@
         # STEP #3
         show_step(3)
         # Run rally task with created task file
+        rally.prepare_rally_task()
+        rally.run_container()
         self.create_and_run_rally_load_task(
             rally, times=60, concurrency=4, timeout=900)
 
@@ -519,7 +523,7 @@
                 # Check that rabbitmq_server on other ctl nodes
                 # was not restarted
                 assert ps == ps_after[node_name], (
-                   "'rabbitmq_server' was restarted while it shouldn't!")
+                    "'rabbitmq_server' was restarted while it shouldn't!")
 
         # Mysql case
         # STEP #5
@@ -582,8 +586,8 @@
             else:
                 # Check that Mysql on other ctl nodes was not restarted
                 assert ps == ps_after[node_name], (
-                   "Mysql was restarted while it shouldn't on node {0}"
-                   .format(node_name))
+                    "Mysql was restarted while it shouldn't on node {0}"
+                    .format(node_name))
 
         # STEP #9
         show_step(9)