Upgrading ES fails because the Curl Call to perform a synced flush fails due to no body being delivered with the POST Request.
The body directive is missing, because the body_format is set to json.
name: Perform a synced flush
become: true
kolla_toolbox:
module_name: uri
module_args:
url: "{{ elasticsearch_internal_endpoint }}/_flush/synced"
method: POST
status_code: 200
return_content: yes
body_format: json
delegate_to: "{{ groups['elasticsearch'][0] }}"
run_once: true
retries: 10
delay: 5
register: result
until: ('status' in result) and result.status == FAILED - RETRYING: test.xyz.com]: Perform a synced flush (1 retries left).
fatal: [test.xyz.com]: FAILED! => {"action": "uri", "attempts": 10, "changed": false, "connection": "close", "content": "{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"request [POST /_flush/synced] does not support having a body\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"request [POST /_flush/synced] does not support having a body\"},\"status\":400}", "content_length": "257", "content_type": "application/json; charset=UTF-8", "elapsed": 0, "json": {"error": {"reason": "request [POST /_flush/synced] does not support having a body"}}
Upgrading ES fails because the Curl Call to perform a synced flush fails due to no body being delivered with the POST Request. The body directive is missing, because the body_format is set to json.