Neha Sinha created METRON-324:
---------------------------------
Summary: Metron deployment task -"Wait for Index to Become
Available" needs to be modified
Key: METRON-324
URL: https://issues.apache.org/jira/browse/METRON-324
Project: Metron
Issue Type: Bug
Affects Versions: 0.2.1BETA
Reporter: Neha Sinha
Priority: Minor
The task "Wait for Index to Become Available" in load_templates.yml reads like
this :-
==========================================================
- name: Wait for Index to Become Available
uri:
url: "http://{{ inventory_hostname }}:{{ elasticsearch_web_port
}}/_cat/health"
method: GET
status_code: 200
return_content: yes
register: result
until: result.content.find("green") != -1 or result.content.find("yellow") !=
-1
retries: 10
delay: 60
===========================================================
We should validate foe variable "result" not being null/empty before executing
the "until" block which specifically looks up the field result.content.
In some of the deployments where elasticsearch service goes down for no reason
during execution of the above task the error that user is presented with is :-
fatal: [node1]: FAILED! => {"failed": true, "msg": "ERROR! The conditional
check 'result.content.find(\"green\") != -1 or result.content.find(\"yellow\")
!= -1' failed. The error was: ERROR! error while evaluating conditional
(result.content.find(\"green\") != -1 or result.content.find(\"yellow\") !=
-1): ERROR! 'dict object' has no attribute 'content'"}
This is ambiguous error as the user is not sure if it's an issue with the
ansible version or the service/product deployment itself.
Regards,
Neha
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)