mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Review Request 62647: Show resource limitations in mesos-execute.
Date Thu, 28 Sep 2017 00:19:39 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62647/
-----------------------------------------------------------

Review request for mesos, Jie Yu and Qian Zhang.


Bugs: MESOS-7963
    https://issues.apache.org/jira/browse/MESOS-7963


Repository: mesos


Description
-------

Show resource limitations in mesos-execute.


Diffs
-----

  src/cli/execute.cpp 78b62a6820ad7a81664a17edcd58f3f9e43da734 


Diff: https://reviews.apache.org/r/62647/diff/1/


Testing
-------

make check (Fedora 26)

Manual testing with the following script:
```
#! /usr/bin/env bash

MESOS=${MESOS:-/opt/mesos/bin}
MASTER=${MASTER:-master.local:5050}

task() {
    cat <<EOF
{
"tasks":
    [
        {

            "name": "$(uuidgen)",
            "task_id": {"value" : "$(uuidgen)"},
            "agent_id": {"value" : ""},
            "resources": [{
                "name": "cpus",
                "type": "SCALAR",
                "scalar": {
                    "value": 0.2
                }
            }, {
                "name": "mem",
                "type": "SCALAR",
                "scalar": {
                    "value": 128
                }
            }, {
                "name": "disk",
                "type": "SCALAR",
                "scalar": {
                    "value": 2
                }
            }
            ],
            "command": {
                "value": "/usr/bin/dd if=/dev/zero of=out.dat bs=1M count=64 ; sleep 10000"
            }
        }
    ]
}
EOF
}

exec $MESOS/mesos-execute --content_type=json --master=$MASTER --task_group="$(task)"
```

The output of this script is:
```
I0927 17:33:22.112021 25491 scheduler.cpp:184] Version: 1.5.0
I0927 17:33:22.120942 25485 scheduler.cpp:470] New master detected at master@x.x.x.x:5050
Subscribed with ID fe7ca611-f5d4-4997-8646-f9df09b3e383-0000
Submitted task group with tasks [ 5de42727-c3ab-4626-a911-a7634b4a4776 ] to agent 'aabd0847-aabc-4eb4-9c66-7d91fc9e9c32-S0'
Received status update TASK_RUNNING for task '5de42727-c3ab-4626-a911-a7634b4a4776'
  source: SOURCE_EXECUTOR
Received status update TASK_FAILED for task '5de42727-c3ab-4626-a911-a7634b4a4776'
  message: 'Disk usage (65552KB) exceeds quota (34MB)'
  source: SOURCE_AGENT
  reason: REASON_CONTAINER_LIMITATION_DISK
  resource limit violation: [{"allocation_info":{"role":"*"},"name":"disk","scalar":{"value":34.0},"type":"SCALAR"}]
```


Thanks,

James Peach


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message