You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Gour Saha (JIRA)" <ji...@apache.org> on 2014/08/04 23:58:14 UTC

[jira] [Updated] (SLIDER-282) No error indication in JSON response for invalid hostname in heartbeat request

     [ https://issues.apache.org/jira/browse/SLIDER-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gour Saha updated SLIDER-282:
-----------------------------

    Description: 
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.

Snippet from JSON request with invalid hostname -
"hostname": "container_1406931682142_0009_01_000003___{color:red}junk{color}"

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}
14/08/04 21:31:14 ERROR agent.AgentProviderService: role.script is unavailable for junk. Commands will not be sent.
{noformat}



  was:
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}




> 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.
> Snippet from JSON request with invalid hostname -
> "hostname": "container_1406931682142_0009_01_000003___{color:red}junk{color}"
> 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}
> 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)