Gour Saha created SLIDER-282:
--------------------------------

             Summary: No error indication in JSON response for invalid hostname 
in heartbeat request
                 Key: SLIDER-282
                 URL: https://issues.apache.org/jira/browse/SLIDER-282
             Project: Slider
          Issue Type: Bug
          Components: appmaster, Web & REST
            Reporter: Gour Saha


When an invalid hostname is provided in the JSON data when agent heartbeats to 
Application Master, the AM does not indicate this in the JSON response. An 
appropriate error is logged in the AM log though.

JSON request data with invalid hostname -
{"nodeStatus": {"status": "HEALTHY", "cause": "NONE"}, "timestamp": 
1407177977626, "hostname": 
"container_1406931682142_0009_01_000003___{color:red}junk{color}", 
"responseId": 28, "fqdn": "c6408.ambari.apache.org", "reports": []}

Full request/response -
{noformat}
curl -i -k -X POST -H "Content-Type: application/json" -d '{"nodeStatus": 
{"status": "HEALTHY", "cause": "NONE"}, "timestamp": 1407177977626, "hostname": 
"container_1406931682142_0009_01_000003___junk", "responseId": 28, "fqdn": 
"c6408.ambari.apache.org", "reports": []}' 
https://c6408.ambari.apache.org:38092/ws/v1/slider/agents/container_1406931682142_0009_01_000003___HBASE_REGIONSERVER/heartbeat
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)

{"hasMappedComponents":false,"executionCommands":[],"statusCommands":[],"restartAgent":false,"responseId":29}
{noformat}

Error in AM log -
{noformat}
Error in AM log -
14/08/04 21:31:14 ERROR agent.AgentProviderService: role.script is unavailable 
for junk. Commands will not be sent.
{noformat}





--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to