Fix compute deployment
If braces are present compound targeting is failing. Patch removes
braces and adds some logging for easier troubleshooting.
Change-Id: I5a17e4b9865c3095be82ec5765229f239e80d74e
Related-Prod: https://mirantis.jira.com/browse/PROD-21274
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 93bb841..765c8ca 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -538,14 +538,17 @@
def gluster_compound = "I@glusterfs:server ${extra_tgt}"
def salt_ca_compound = "I@salt:minion:ca:salt_master_ca ${extra_tgt}"
// Enforce highstate asynchronous only on compute nodes which are not glusterfs and not salt ca servers
- def hightstateTarget = "${compute_compound} and not (${gluster_compound}) and not (${salt_ca_compound})"
+ def hightstateTarget = "${compute_compound} and not ${gluster_compound} and not ${salt_ca_compound}"
if (salt.testTarget(master, hightstateTarget)) {
retry(2) {
salt.enforceHighstateWithExclude(master, hightstateTarget, 'opencontrail.client')
}
+ } else {
+ common.infoMsg("No minions matching highstate target found for target ${hightstateTarget}")
}
// Iterate through salt ca servers and check if they have compute role
// TODO: switch to batch once salt 2017.7+ would be used
+ common.infoMsg("Checking whether ${salt_ca_compound} minions have ${compute_compound} compound")
for ( target in salt.getMinionsSorted(master, salt_ca_compound) ) {
for ( cmp_target in salt.getMinionsSorted(master, compute_compound) ) {
if ( target == cmp_target ) {
@@ -558,6 +561,7 @@
}
// Iterate through glusterfs servers and check if they have compute role
// TODO: switch to batch once salt 2017.7+ would be used
+ common.infoMsg("Checking whether ${gluster_compound} minions have ${compute_compound} compound")
for ( target in salt.getMinionsSorted(master, gluster_compound) ) {
for ( cmp_target in salt.getMinionsSorted(master, compute_compound) ) {
if ( target == cmp_target ) {