You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Neil Conway (JIRA)" <ji...@apache.org> on 2016/10/07 14:59:20 UTC

[jira] [Created] (MESOS-6334) Don't send TASK_LOST when removing an agent from the master

Neil Conway created MESOS-6334:
----------------------------------

             Summary: Don't send TASK_LOST when removing an agent from the master
                 Key: MESOS-6334
                 URL: https://issues.apache.org/jira/browse/MESOS-6334
             Project: Mesos
          Issue Type: Improvement
          Components: master
            Reporter: Neil Conway
            Assignee: Neil Conway


Update this:

{code}
  // Transition the tasks to lost and remove them.
  foreachkey (const FrameworkID& frameworkId, utils::copy(slave->tasks)) {
    foreachvalue (Task* task, utils::copy(slave->tasks[frameworkId])) {
      const StatusUpdate& update = protobuf::createStatusUpdate(
          task->framework_id(),
          task->slave_id(),
          task->task_id(),
          TASK_LOST,
          TaskStatus::SOURCE_MASTER,
          None(),
          "Slave " + slave->info.hostname() + " removed: " + removalCause,
          TaskStatus::REASON_SLAVE_REMOVED,
          (task->has_executor_id() ?
              Option<ExecutorID>(task->executor_id()) : None()));

      updateTask(task, update);
      removeTask(task);

      Framework* framework = getFramework(frameworkId);
      if (framework == nullptr) {
        LOG(WARNING) << "Dropping update " << update
                     << " for unknown framework " << frameworkId;
      } else {
        forward(update, UPID(), framework);
      }
    }
  }
{code}



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