Neil Conway created MESOS-6331:
----------------------------------

             Summary: Don't send TASK_LOST when accepting offers in a 
disconnected scheduler
                 Key: MESOS-6331
                 URL: https://issues.apache.org/jira/browse/MESOS-6331
             Project: Mesos
          Issue Type: Improvement
          Components: scheduler driver
            Reporter: Neil Conway
            Assignee: Neil Conway


Update this to send TASK_DROPPED for partition-aware frameworks:

{code}
    if (!connected) {
      VLOG(1) << "Ignoring accept offers message as master is disconnected";

      // NOTE: Reply to the framework with TASK_LOST messages for each
      // task launch. See details from notes in launchTasks.
      foreach (const Offer::Operation& operation, operations) {
        if (operation.type() != Offer::Operation::LAUNCH) {
          continue;
        }

        foreach (const TaskInfo& task, operation.launch().task_infos()) {
          StatusUpdate update = protobuf::createStatusUpdate(
              framework.id(),
              None(),
              task.task_id(),
              TASK_LOST,
              TaskStatus::SOURCE_MASTER,
              None(),
              "Master disconnected",
              TaskStatus::REASON_MASTER_DISCONNECTED);

          statusUpdate(UPID(), update, UPID());
        }
      }
      return;
    }
{code}




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

Reply via email to