Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.5.0
-
None
Description
Currently, parsing of Host Checks after registration happens on UI, and on 1200 nodes it grows to 320mb of data, which hard to download and then parse. We can move parsing and aggregating data on the server, so on UI we will receive only required info.
Request URL:
/api/v1/requests/24?fields=tasks/Tasks,Requests/inputs,Requests/request_status
Part of response:
"tasks" : [ { "href" : "http://104.196.95.1:8080/api/v1/requests/24/tasks/31414", "Tasks" : { "attempt_cnt" : 1, "command" : "ACTIONEXECUTE", "command_detail" : "check_host ACTIONEXECUTE", "end_time" : 1481047483941, "error_log" : "/home/testvbrodetskyi-0001/var/lib/ambari-agent/data/errors-31414.txt", "exit_code" : 0, "host_name" : "testvbrodetskyi-0001", "id" : 31414, "output_log" : "/home/testvbrodetskyi-0001/var/lib/ambari-agent/data/output-31414.txt", "request_id" : 24, "role" : "check_host", "stage_id" : 0, "start_time" : 1481047457478, "status" : "COMPLETED", "stderr" : "None", "stdout" : "2016-12-06 18:04:25,626 - Host checks started.\n2016-12-06 18:04:25,626 - Check execute list: host_resolution_check\n2016-12-06 18:04:25,626 - IP address forward resolution check started.\n2016-12-06 18:04:43,192 - There were 1200 host(s) that could not resolve to an IP address.\n2016-12-06 18:04:43,193 - IP address forward resolution check completed.\n2016-12-06 18:04:43,215 - Host checks completed.\n\nCommand completed successfully!\n", "structured_out" : { "host_resolution_check" : { "exit_code" : 0, "failed_count" : 1200, "failures" : [ { "type" : "FORWARD_LOOKUP", "host" : "testvbrodetskyi-0601", "cause" : [ -2, "Name or service not known" ] }, { "type" : "FORWARD_LOOKUP", "host" : "testvbrodetskyi-0602", "cause" : [ -2, "Name or service not known" ] },
In case of 1200 for each host we have1200 objects in failures array so in result we have 1200x1200 objects as:
{ "type" : "FORWARD_LOOKUP", "host" : "testvbrodetskyi-0602", "cause" : [ -2, "Name or service not known" ] },
However we on UI we parse only hosts' names, we can reduce response size by changing failures to just array of host_names like:
"failures" : ["testvbrodetskyi-0602", "testvbrodetskyi-0603", "testvbrodetskyi-0604", ...]
Attachments
Attachments
Issue Links
- links to