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

Do not transition tasks to TASK_KILLED on framework teardown

    XMLWordPrintableJSON

Details

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

    Description

      When a framework is torn down or disconnects, we currently transition the framework's tasks to state TASK_KILLED at the master. See

      This happens at the master; concurrently, the master sends a ShutdownFrameworkMessage to each agent that is running one of the framework's tasks.

      Marking the task KILLED in this manner is problematic for two reasons:

      1. The task is still running and may continue running for an unbounded length of time if the agent becomes partitioned.
      2. KILLED is usually used to denote tasks that are killed in response to a "kill task" operation.

      My primary concern here is #1. We could pick a different terminal state to address #2 but I think that is secondary: transitioning the task to any terminal state before it has been terminated is problematic, in my view.

      Proposed behavior: when the framework teardown is applied, we keep the task in its current state at the master. Then when the agent receives the ShutdownFrameworkMessage, it can shutdown the task and eventually respond with a terminal status update. At that point we can transition the task into the appropriate terminal state (whether it be KILLED, FAILED, GONE, or a new state).

      This will probably require some changes to the status update machinery, since we currently drop status updates for terminating frameworks at the slave. Since the scheduler is gone, we'd need to have the master ack the status update rather than the framework.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neilc Neil Conway
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: