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

Guangya Liu updated MESOS-5313:
-------------------------------
    Description: 
{code}
root@mesos002:~/test# curl -d jsonMessageBody -X POST 
http://192.168.56.12:5050/quota
Failed to parse set quota request JSON 'jsonMessageBody': syntax error at line 
1 near: jsonMessageBodyroot@mesos002:~/test# cat jsonMessageBody
{
        "role": "role1",
        "guarantee": [{
                "name": "cpus",
                "type": "SCALAR",
                "scalar": {
                        "value": 1
                }
        }, {
                "name": "mem",
                "type": "SCALAR",
                "scalar": {
                        "value": 128
                }
        }]
}
root@mesos002:~/test# curl -d weight.json -X PUT 
http://192.168.56.12:5050/weights
Failed to parse update weights request JSON ('weight.json'): syntax error at 
line 1 near: weight.js
root@mesos002:~/test# cat weight.json
    [
      {
        "role": "role1",
        "weight": 2.0
      },
      {
        "role": "role2",
        "weight": 3.5
      }
    ]
{code}

The right command should be adding {{@}} before the quota json file 
{{jsonMessageBody}}.

  was:
{code}
root@mesos002:~/test# curl -d jsonMessageBody -X POST 
http://192.168.56.12:5050/quota
Failed to parse set quota request JSON 'jsonMessageBody': syntax error at line 
1 near: jsonMessageBodyroot@mesos002:~/test# cat jsonMessageBody
{
        "role": "role1",
        "guarantee": [{
                "name": "cpus",
                "type": "SCALAR",
                "scalar": {
                        "value": 1
                }
        }, {
                "name": "mem",
                "type": "SCALAR",
                "scalar": {
                        "value": 128
                }
        }]
}
{code}

The right command should be adding {{@}} before the quota json file 
{{jsonMessageBody}}.


> Failed to set quota and update weight according to document
> -----------------------------------------------------------
>
>                 Key: MESOS-5313
>                 URL: https://issues.apache.org/jira/browse/MESOS-5313
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Guangya Liu
>            Assignee: Guangya Liu
>
> {code}
> root@mesos002:~/test# curl -d jsonMessageBody -X POST 
> http://192.168.56.12:5050/quota
> Failed to parse set quota request JSON 'jsonMessageBody': syntax error at 
> line 1 near: jsonMessageBodyroot@mesos002:~/test# cat jsonMessageBody
> {
>       "role": "role1",
>       "guarantee": [{
>               "name": "cpus",
>               "type": "SCALAR",
>               "scalar": {
>                       "value": 1
>               }
>       }, {
>               "name": "mem",
>               "type": "SCALAR",
>               "scalar": {
>                       "value": 128
>               }
>       }]
> }
> root@mesos002:~/test# curl -d weight.json -X PUT 
> http://192.168.56.12:5050/weights
> Failed to parse update weights request JSON ('weight.json'): syntax error at 
> line 1 near: weight.js
> root@mesos002:~/test# cat weight.json
>     [
>       {
>         "role": "role1",
>         "weight": 2.0
>       },
>       {
>         "role": "role2",
>         "weight": 3.5
>       }
>     ]
> {code}
> The right command should be adding {{@}} before the quota json file 
> {{jsonMessageBody}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to