You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by James Peach <jp...@apache.org> on 2017/09/28 00:19:39 UTC
Review Request 62647: Show resource limitations in mesos-execute.
-----------------------------------------------------------
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
Re: Review Request 62647: Printed resource limitations from
mesos-execute.
Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62647/#review187654
-----------------------------------------------------------
Ship it!
Ship It!
- Qian Zhang
On Sept. 28, 2017, 8:19 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62647/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2017, 8:19 a.m.)
>
>
> Review request for mesos, Jie Yu and Qian Zhang.
>
>
> Bugs: MESOS-7963
> https://issues.apache.org/jira/browse/MESOS-7963
>
>
> Repository: mesos
>
>
> Description
> -------
>
> If mesos-execute received a status update containing a resource
> limitation, print the corresponding resource.
>
>
> Diffs
> -----
>
> src/cli/execute.cpp 78b62a6820ad7a81664a17edcd58f3f9e43da734
>
>
> Diff: https://reviews.apache.org/r/62647/diff/2/
>
>
> 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
>
>
Re: Review Request 62647: Show resource limitations in mesos-execute.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62647/#review186970
-----------------------------------------------------------
Ship it!
Ship It!
- Jie Yu
On Sept. 28, 2017, 12:19 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62647/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2017, 12:19 a.m.)
>
>
> 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
>
>