You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Chris Lambert (JIRA)" <ji...@apache.org> on 2014/06/14 01:08:03 UTC

[jira] [Updated] (MESOS-1417) Slave should not send terminal status update before containerizer update is finished

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

Chris Lambert updated MESOS-1417:
---------------------------------

    Sprint: Q2'14 Sprint 2, Q2 Sprint 3, Q2 Sprint 4  (was: Q2'14 Sprint 2, Q2 Sprint 3)

> Slave should not send terminal status update before containerizer update is finished
> ------------------------------------------------------------------------------------
>
>                 Key: MESOS-1417
>                 URL: https://issues.apache.org/jira/browse/MESOS-1417
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Jie Yu
>            Assignee: Ian Downes
>            Priority: Critical
>
> This starts to become a problem when we introduce the network isolator. Say a port P is initially allocated to task A. When task A finishes, if we don't wait for containerizer update to finish and send TASK_FINISHED to the master, port P might be allocated to some other task B on the same host before it is even freed!
> {noformat}
> void Slave::statusUpdate(const StatusUpdate& update, const UPID& pid)
> {
>   ...
>   if (protobuf::isTerminalState(status.state()) &&
>       (executor->queuedTasks.contains(status.task_id()) ||
>        executor->launchedTasks.contains(status.task_id()))) {
>     executor->terminateTask(status.task_id(), status.state());
>     // Tell the isolator to update the resources.
>     // TODO(idownes): Wait until this completes.
>     CHECK_SOME(executor->resources);
>     containerizer->update(executor->containerId, executor->resources.get());
>   }
>   if (executor->checkpoint) {
>     // Ask the status update manager to checkpoint and reliably send the update.
>     statusUpdateManager->update(
>         update,
>         info.id(),
>         executor->id,
>         executor->containerId)
>       .onAny(defer(self(),
>                    &Slave::_statusUpdate,
>                    lambda::_1,
>                    update,
>                    pid));
>   } else {
>     ...
>   }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)