You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Guangya Liu (JIRA)" <ji...@apache.org> on 2016/05/16 09:08:13 UTC

[jira] [Commented] (MESOS-5387) mesos-execute exit status is always success

    [ https://issues.apache.org/jira/browse/MESOS-5387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15284285#comment-15284285 ] 

Guangya Liu commented on MESOS-5387:
------------------------------------

I think that you can grep some keywords to check if the task succeed or finished.

Succeed Case:
{code}
root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050 --command="sleep 1" --name=test
I0516 01:42:26.323176 31398 scheduler.cpp:187] Version: 0.29.0
I0516 01:42:26.325219 31412 scheduler.cpp:471] New master detected at master@192.168.56.12:5050
Subscribed with ID 'fdecb9fa-28ca-4054-8490-0de6221610b9-0002'
Submitted task 'test' to agent 'fdecb9fa-28ca-4054-8490-0de6221610b9-S1'
Received status update TASK_RUNNING for task 'test'
  source: SOURCE_EXECUTOR
Received status update TASK_FINISHED for task 'test'
  message: 'Command exited with status 0'
  source: SOURCE_EXECUTOR
{code}

Failed Case:
{code}
root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050 --command="sleepx 100000" --name=test
I0516 01:37:49.057669 31319 scheduler.cpp:187] Version: 0.29.0
I0516 01:37:49.060359 31339 scheduler.cpp:471] New master detected at master@192.168.56.12:5050
Subscribed with ID 'fdecb9fa-28ca-4054-8490-0de6221610b9-0001'
Submitted task 'test' to agent 'fdecb9fa-28ca-4054-8490-0de6221610b9-S1'
Received status update TASK_RUNNING for task 'test'
  source: SOURCE_EXECUTOR
Received status update TASK_FAILED for task 'test'
  message: 'Command exited with status 127'
  source: SOURCE_EXECUTOR
{code}

> mesos-execute exit status is always success
> -------------------------------------------
>
>                 Key: MESOS-5387
>                 URL: https://issues.apache.org/jira/browse/MESOS-5387
>             Project: Mesos
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: 0.28.1
>            Reporter: Luca Bruno
>
> mesos-execute should be able to return an exit status based on the status of the task. Currently it always exists with 0.
> It's very hard for a caller to know the status of the task, for example from a bash script calling mesos-execute.
> I believe mesos-execute is a simple but very useful cli tool for one-shot tasks, and as such deserves more attention.
> Thanks.



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