Skip to content

Commit

Permalink
Enable shard allocation before checking cluster health
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Brooks authored Jan 27, 2025
1 parent b1aa795 commit 2245b50
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/roles/elasticsearch/tasks/es_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@
port: "{{ elasticsearch_transport_port }}"
delay: 35

- name: Wait for cluster health to return to yellow or green
uri:
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/health"
method: GET
register: response
until: "response.json.status == 'yellow' or response.json.status == 'green'"
retries: 5
delay: 30

- name: Enable shard allocation for the cluster
uri:
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/settings"
Expand All @@ -140,6 +131,15 @@
retries: 5
delay: 30

- name: Wait for cluster health to return to yellow or green
uri:
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/health"
method: GET
register: response
until: "response.json.status == 'yellow' or response.json.status == 'green'"
retries: 5
delay: 30


#
# No re-display Elasticsearch version
Expand Down

0 comments on commit 2245b50

Please sign in to comment.