retry fix for temporary dns failure resolution in slow envs
Change-Id: If61b0533d1e2da0cf6e1d4483d5a3e9e96bd3096
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 92d317b..33c0734 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -37,7 +37,9 @@
} catch (Throwable e) {
common.warningMsg('Salt state salt.minion.base is not present in the Salt-formula yet.')
}
- salt.enforceState(master, '*', ['linux.system'])
+ common.retry(2,5){
+ salt.enforceState(master, '*', ['linux.system'])
+ }
if (staticMgmtNet) {
salt.runSaltProcessStep(master, '*', 'cmd.shell', ["salt-call state.sls linux.network; salt-call service.restart salt-minion"], null, true, 60)
}
@@ -75,7 +77,9 @@
} catch (Throwable e) {
common.warningMsg('Salt state salt.minion.base is not present in the Salt-formula yet.')
}
- salt.enforceState(master, target, ['linux.system'])
+ common.retry(2,5){
+ salt.enforceState(master, target, ['linux.system'])
+ }
if (staticMgmtNet) {
salt.runSaltProcessStep(master, target, 'cmd.shell', ["salt-call state.sls linux.network; salt-call service.restart salt-minion"], null, true, 60)
}