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

Qian Zhang commented on MESOS-7975:
-----------------------------------

commit 815263ead42f64fd0ff320614cfada30b2e8f899
Author: Qian Zhang <[email protected]>
Date:   Wed Oct 4 23:38:11 2017 +0800

    Added a test `ROOT_NoTransitionFromKillingToFinished`.
    
    Review: https://reviews.apache.org/r/62775

 src/tests/default_executor_tests.cpp  | 181 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/tests/kill_policy_test_helper.cpp |   9 +++++++
 2 files changed, 190 insertions(+)

commit f569aeee31ec7a9b9352fad729c6bdd7ef592f48
Author: Qian Zhang <[email protected]>
Date:   Wed Oct 4 15:44:41 2017 +0800

    Added a test `ROOT_DOCKER_NoTransitionFromKillingToFinished`.
    
    Review: https://reviews.apache.org/r/62774

 src/tests/containerizer/docker_containerizer_tests.cpp | 123 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 123 insertions(+)

commit 8e3cb6ae6ca7d25fe768467ecc0a65f7509fce43
Author: Qian Zhang <[email protected]>
Date:   Thu Sep 14 17:33:05 2017 +0800

    Checked TASK_KILLED in the test `ROOT_INTERNET_CURL_PortMapper`.
    
    Review: https://reviews.apache.org/r/62327

 src/tests/containerizer/cni_isolator_tests.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

commit 0449a0840d154fc169fb0b1d866d8c6b87ca5eae
Author: Qian Zhang <[email protected]>
Date:   Thu Sep 14 17:29:39 2017 +0800

    Always send TASK_KILLED when the task is killed by a framework.
    
    This change is done for command, docker and default executors.
    
    Review: https://reviews.apache.org/r/62326

 src/docker/executor.cpp           | 6 +++---
 src/launcher/default_executor.cpp | 6 +++---
 src/launcher/executor.cpp         | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

commit ce83476449a0c2cfa6d192b4d017d302d92fea7b
Author: Qian Zhang <[email protected]>
Date:   Fri Sep 29 15:28:58 2017 +0800

    Updated the comments of TASK_FINISHED to make it more clear.
    
    Review: https://reviews.apache.org/r/62685

 include/mesos/mesos.proto    | 4 +++-
 include/mesos/v1/mesos.proto | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

> The command/default/docker executor can incorrectly send a TASK_FINISHED 
> update even when the task is killed
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-7975
>                 URL: https://issues.apache.org/jira/browse/MESOS-7975
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Anand Mazumdar
>            Assignee: Qian Zhang
>            Priority: Critical
>              Labels: mesosphere
>             Fix For: 1.5.0
>
>
> Currently, when a task is killed, the default/command/docker executor 
> incorrectly send a {{TASK_FINISHED}} status update instead of 
> {{TASK_KILLED}}. This is due to an unfortunate missed conditional check when 
> the task exits with a zero status code.
> {code}
>       if (WSUCCEEDED(status)) {
>         taskState = TASK_FINISHED;
>       } else if (killed) {
>         // Send TASK_KILLED if the task was killed as a result of
>         // kill() or shutdown().
>         taskState = TASK_KILLED;
>       } else {
>         taskState = TASK_FAILED;
>       }
> {code}
> We should modify the code to correctly send {{TASK_KILLED}} status updates 
> when a task is killed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to