Klaus Ma created MESOS-4741:
-------------------------------

             Summary: Add role information for static reservation in 
/master/roles
                 Key: MESOS-4741
                 URL: https://issues.apache.org/jira/browse/MESOS-4741
             Project: Mesos
          Issue Type: Bug
          Components: HTTP API
            Reporter: Klaus Ma
            Assignee: Klaus Ma


In {{/master/roles}}, it should show static reservation roles if there's no 
tasks.

{code}
Klauss-MacBook-Pro:mesos klaus$ curl http://localhost:5050/master/roles.json | 
python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   221  100   221    0     0  28612      0 --:--:-- --:--:-- --:--:-- 31571
{
    "roles": [
        {
            "frameworks": [],
            "name": "*",
            "resources": {
                "cpus": 0,
                "disk": 0,
                "mem": 0
            },
            "weight": 1.0
        },
        {
            "frameworks": [
                "b4f15a2e-5d9a-4d31-a29e-7737af41c8e4-0002"
            ],
            "name": "r1",
            "resources": {
                "cpus": 1.0,
                "disk": 0,
                "mem": 0
            },
            "weight": 1.0
        }
    ]
}
{code}

After submit tasks to r1, it'll show roles.

{code}
Klauss-MacBook-Pro:mesos klaus$ curl http://localhost:5050/master/roles | 
python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   221  100   221    0     0  32721      0 --:--:-- --:--:-- --:--:-- 36833
{
    "roles": [
        {
            "frameworks": [],
            "name": "*",
            "resources": {
                "cpus": 0,
                "disk": 0,
                "mem": 0
            },
            "weight": 1.0
        },
        {
            "frameworks": [
                "b4f15a2e-5d9a-4d31-a29e-7737af41c8e4-0002"
            ],
            "name": "r1",
            "resources": {
                "cpus": 1.0,
                "disk": 0,
                "mem": 0
            },
            "weight": 1.0
        }
    ]
}
{code}



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

Reply via email to