[
https://issues.apache.org/jira/browse/MESOS-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jie Yu updated MESOS-1417:
--------------------------
Sprint: Q2'14 Sprint 2
> 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
> 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)