X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=blobdiff_plain;f=elasticsearch%2Fclient%2Fupdate_index_templates.sls;h=605c06406217cbebe759fe63de683b6816005deb;hp=88c8e6477d190fcd943943042ce4f1a5f9eeb43b;hb=f9ede3488d97b79439c0d04a847db14d750b8f6b;hpb=8e0029b8d5dfed0a8e797f30c6cbc1993b4d542e diff --git a/elasticsearch/client/update_index_templates.sls b/elasticsearch/client/update_index_templates.sls index 88c8e64..605c064 100644 --- a/elasticsearch/client/update_index_templates.sls +++ b/elasticsearch/client/update_index_templates.sls @@ -5,6 +5,17 @@ include: - elasticsearch.client.service {%- for index_name, index in client.get('index', {}).iteritems() %} +# TODO: "Replace with module.run when bug is fixed". +# Since bug in retry logic in salt (#49895) we need to use a workaround for now. +elasticsearch_check_cluster_status_before_index_template_upgrade_{{ index_name }}: + cmd.run: + - name: curl -sf {{ client.server.host }}:{{ client.server.port }}/_cat/health | awk '{print $4}' | grep green + - retry: + attempts: 5 + until: True + interval: 10 + splay: 5 + elasticsearch_index_template_upgrade_{{ index_name }}: {%- if index.get('enabled', False) %}