Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6333

Don't send TASK_LOST when removing a framework from an agent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • master

    Description

      Update this 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);
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            neilc Neil Conway
            Vinod Kone Vinod Kone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: