Kill salt-master & minion after change in configuration

Change-Id: I1c3883e3a756cd03b7a3950cbfa4d8147c524352
diff --git a/src/com/mirantis/mk/SaltModelTesting.groovy b/src/com/mirantis/mk/SaltModelTesting.groovy
index fba7049..38f486a 100644
--- a/src/com/mirantis/mk/SaltModelTesting.groovy
+++ b/src/com/mirantis/mk/SaltModelTesting.groovy
@@ -58,8 +58,8 @@
           sh("bash -c 'source /srv/salt/scripts/bootstrap.sh; cd /srv/salt/scripts && source_local_envs && saltmaster_bootstrap'")
         } else {
           sh("cp -r ${testDir}/* /srv/salt/reclass && echo '127.0.1.2  salt' >> /etc/hosts")
-          sh("service salt-master restart && service salt-minion restart && sleep 15")
           sh("bash -c 'source /srv/salt/scripts/bootstrap.sh; cd /srv/salt/scripts && source_local_envs && configure_salt_master && configure_salt_minion'")
+          sh("(pgrep salt-master | sed /$$/d | xargs --no-run-if-empty -i{} kill -9 {} || true) && pkill -9 salt-minion || true")
           sh("service salt-master restart && service salt-minion restart && sleep 15")
         }