Fix octavia minion cert deploy
Change-Id: Ibbf6ee45d8ea0add4ed874022141967f19f50a33
Related-PROD: PROD-24371
(cherry picked from commit fb2d4372995316b53f41a806827d8c40c5820523)
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 2b15a92..e230427 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -56,9 +56,16 @@
sleep(5)
salt.enforceState(master, "I@linux:system ${extra_tgt}", ['linux', 'openssh', 'ntp', 'rsyslog'])
- common.retry(3, 5) {
- salt.enforceState(master, "* ${extra_tgt}", ['salt.minion'], true, false, null, false, 60, 2)
+ if (salt.testTarget(master, "I@octavia:manager ${extra_tgt}")) {
+ salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'salt.minion.ca')
+
+ common.retry(3, 5) {
+ salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'salt.minion.cert')
+ }
}
+
+ salt.enforceState(master, "* ${extra_tgt}", ['salt.minion'], true, false, null, false, 60, 2)
+
sleep(5)
salt.fullRefresh(master, "* ${extra_tgt}")
@@ -474,10 +481,8 @@
if (salt.testTarget(master, "I@octavia:manager ${extra_tgt}")) {
salt.runSaltProcessStep(master, "I@neutron:client ${extra_tgt}", 'mine.update')
salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'octavia.manager')
- common.retry(2) {
- salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'salt.minion.ca')
- }
- common.retry(2) {
+ salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'salt.minion.ca')
+ common.retry(2, 5) {
salt.enforceState(master, "I@octavia:manager ${extra_tgt}", 'salt.minion.cert')
}
salt.enforceState(master, "I@octavia:client ${extra_tgt}", 'octavia.client')