bootstrap salt:master before the rest of nodes
There was a race-condition when salt.minion on config node was execute
after the minions. We should bootstrap cfg node first.
Change-Id: I3069c982878817709d94796191bd8b3ecb64bfe9
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 478c067..b212306 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -19,8 +19,13 @@
def salt = new com.mirantis.mk.Salt()
salt.enforceState(master, 'I@salt:master', ['salt.master', 'reclass'], true)
- salt.runSaltProcessStep(master, 'I@linux:system', 'saltutil.refresh_pillar', [], null, true)
- salt.runSaltProcessStep(master, 'I@linux:system', 'saltutil.sync_all', [], null, true)
+
+ salt.runSaltProcessStep(master, '*', 'saltutil.refresh_pillar', [], null, true)
+ salt.runSaltProcessStep(master, '*', 'saltutil.sync_all', [], null, true)
+
+ salt.enforceState(master, 'I@salt:master', ['linux.system'], true)
+ salt.enforceState(master, 'I@salt:master', ['salt.minion'], true)
+
salt.enforceState(master, '*', ['linux.system'], true)
salt.enforceState(master, '*', ['salt.minion'], true)
salt.enforceState(master, 'I@linux:system', ['linux', 'openssh', 'salt.minion', 'ntp'], true)