Retry perform a synced flush task while upgrading elasticsearch

The synced flush fails due to concurrent indexing operations.
The HTTP status code in that case will be 409 CONFLICT. We can
retry this task until returns success.

Change-Id: I57f9a009b12715eed8dfcf829a71f418d2ce437b
This commit is contained in:
Serhat Demircan 2019-03-27 18:06:33 +03:00
parent 47a2c5a85e
commit adb02958e7

@ -21,6 +21,10 @@
body_format: json
delegate_to: "{{ groups['elasticsearch'][0] }}"
run_once: true
retries: 10
delay: 5
register: result
until: ('status' in result) and result.status == 200
# Stop all elasticsearch containers before applying configuration to ensure
# handlers are triggered to restart them.