Add elasticsearch scheme var to status check
Change-Id: I928e2127e12d08b8ff708b4ae227bb96f71d8dc3
PROD-related: PROD-30514
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 02af05d..15de301 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -890,9 +890,18 @@
} else {
common.errorMsg('[ERROR] Elasticsearch VIP port could not be retrieved')
}
+ pillar = salt.getPillar(master, "I@elasticsearch:client ${extra_tgt}", 'elasticsearch:client:server:scheme')
+ def elasticsearch_scheme
+ if(!pillar['return'].isEmpty()) {
+ elasticsearch_scheme = pillar['return'][0].values()[0]
+ } else {
+ common.infoMsg('No pillar with Elasticsearch server scheme, using http')
+ elasticsearch_scheme = "http"
+ }
+
common.retry(step_retries,step_retries_wait) {
common.infoMsg('Waiting for Elasticsearch to become green..')
- salt.cmdRun(master, "I@elasticsearch:client ${extra_tgt}", "curl -sf ${elasticsearch_vip}:${elasticsearch_port}/_cat/health | awk '{print \$4}' | grep green")
+ salt.cmdRun(master, "I@elasticsearch:client ${extra_tgt}", "curl -skf ${elasticsearch_scheme}://${elasticsearch_vip}:${elasticsearch_port}/_cat/health | awk '{print \$4}' | grep green")
}
salt.enforceState([saltId: master, target: "I@elasticsearch:client ${extra_tgt}", state: 'elasticsearch.client', retries: step_retries, retries_wait: step_retries_wait])