ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-6056) Agent Custom Command Output Coerces Integers to Floats
Date Fri, 06 Jun 2014 20:53:01 GMT
Jonathan Hurley created AMBARI-6056:
---------------------------------------

             Summary: Agent Custom Command Output Coerces Integers to Floats
                 Key: AMBARI-6056
                 URL: https://issues.apache.org/jira/browse/AMBARI-6056
             Project: Ambari
          Issue Type: Bug
    Affects Versions: 1.6.1
         Environment: CentOS 6.4
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
             Fix For: 1.6.1


When posting a command such as

{code}
{
  "RequestInfo": {
    "action": "check_host", 
    "context": "Check host", 
    "parameters": {
      "check_execute_list": "host_resolution_check", 
      "hosts": "c6401.ambari.apache.org, c6402.ambari.apache.org, c6403.ambari.apache.org,
foobar", 
      "threshold": "20"
    }
  }, 
  "Requests/resource_filters": [
    {
      "hosts": "c6401.ambari.apache.org,c6402.ambari.apache.org"
    }
  ]
{code}

The returned result from the custom action has some integer values coerced into floats:

{code}
    "structured_out" : {
      "host_resolution_check" : {
        "exit_code" : "0",
        "failed_count" : 0.0,
        "failures" : [ ],
        "message" : "All hosts resolved to an IP address.",
        "success_count" : 4.0
      }
{code}

The structured_output written out to disk does _NOT_ have the float values:

{code}
{"host_resolution_check": {"failures": [], "message": "All hosts resolved to an IP address.",
"failed_count": 0, "success_count": 4, "exit_code": "0"}}
{code} 

Therefore this is a problem with the framework and not the command.



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

Mime
View raw message