Make sure we apply salt.master after update cluster model
applying reclass state may update cluster model. This change move
applying salt.master state after we applied reclass to make sure
updated cluster model is picked.
Change-Id: I16a82b24a58195c9d0c0a40e8af773783de71392
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 1459005..857884c 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -17,14 +17,20 @@
def installFoundationInfra(master) {
def salt = new com.mirantis.mk.Salt()
- salt.enforceState(master, 'I@salt:master', ['salt.master', 'reclass'], true, false, null, false, 120, 2)
+ // NOTE(vsaienko) Apply reclass first, it may update cluster model
+ // apply linux and salt.master salt.minion states afterwards to make sure
+ // correct cluster model is used.
+ salt.enforceState(master, 'I@salt:master', ['reclass'], true)
+ salt.enforceState(master, 'I@salt:master', ['linux.system'], true)
+ salt.enforceState(master, 'I@salt:master', ['salt.master'], true, false, null, false, 120, 2)
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, false, null, false, 60, 2)
salt.enforceState(master, 'I@salt:master', ['salt.minion'], true)
+ salt.runSaltProcessStep(master, '*', 'saltutil.refresh_pillar', [], null, true)
+ salt.runSaltProcessStep(master, '*', 'saltutil.sync_all', [], null, true)
salt.enforceState(master, '*', ['linux.system'], true)
salt.enforceState(master, 'I@linux:system', ['linux', 'openssh', 'ntp'], true)