You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Vinod Kone (JIRA)" <ji...@apache.org> on 2018/01/30 00:13:00 UTC

[jira] [Assigned] (MESOS-6333) Don't send TASK_LOST when removing a framework from an agent

     [ https://issues.apache.org/jira/browse/MESOS-6333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinod Kone reassigned MESOS-6333:
---------------------------------

    Assignee:     (was: Neil Conway)

> Don't send TASK_LOST when removing a framework from an agent
> ------------------------------------------------------------
>
>                 Key: MESOS-6333
>                 URL: https://issues.apache.org/jira/browse/MESOS-6333
>             Project: Mesos
>          Issue Type: Improvement
>          Components: master
>            Reporter: Neil Conway
>            Priority: Major
>              Labels: mesosphere
>
> Update this code:
> {code}
>   // Remove pointers to framework's tasks in slaves, and send status
>   // updates.
>   // NOTE: A copy is needed because removeTask modifies slave->tasks.
>   foreachvalue (Task* task, utils::copy(slave->tasks[framework->id()])) {
>     // Remove tasks that belong to this framework.
>     if (task->framework_id() == framework->id()) {
>       // A framework might not actually exist because the master failed
>       // over and the framework hasn't reconnected yet. For more info
>       // please see the comments in 'removeFramework(Framework*)'.
>       const StatusUpdate& update = protobuf::createStatusUpdate(
>         task->framework_id(),
>         task->slave_id(),
>         task->task_id(),
>         TASK_LOST,
>         TaskStatus::SOURCE_MASTER,
>         None(),
>         "Slave " + slave->info.hostname() + " disconnected",
>         TaskStatus::REASON_SLAVE_DISCONNECTED,
>         (task->has_executor_id()
>             ? Option<ExecutorID>(task->executor_id()) : None()));
>       updateTask(task, update);
>       removeTask(task);
>       forward(update, UPID(), framework);
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)