Fix for restart fails in the installFoundationInfraOnTarget function
If staticMgmtNet is true, then restarting the salt-minion service
fails because of missed dependency packages. But if we install all
repositories before checking this flag, it will resolve the issue.
Closes-Bug: PROD-34400
Change-Id: I023b9f6ab7acd8f48bad6fa398568c3a32431ae9
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 2dacace..b559a7f 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -83,6 +83,8 @@
salt.enforceState([saltId: master, target: "I@salt:master ${extra_tgt}", state: ['reclass'], failOnError: false, read_timeout: 120, retries: 2])
salt.fullRefresh(master, target)
salt.enforceState([saltId: master, target: target, state: ['linux.network.proxy'], failOnError: false, read_timeout: 60, retries: 2])
+ // Make sure all repositories are in place before proceeding with package installation from other states
+ salt.enforceState([saltId: master, target: target, state: ['linux.system.repo'], batch: batch, failOnError: false, read_timeout: 180, retries: 2])
try {
salt.enforceState([saltId: master, target: target, state: ['salt.minion.base'], failOnError: false, read_timeout: 60, retries: 2])
sleep(5)