> On Feb. 18, 2016, 9:44 a.m., Qian Zhang wrote:
> > I see you send TASK_KILLING once the killTask() is invoked. However, 
> > according to the description of MESOS-4140, we may need to send such status 
> > update after SIGTERM is sent to the task and before SIGKILL is sent. So 
> > maybe you should send TASK_KILLING in shutdown() instead?
> 
> Abhishek Dasgupta wrote:
>     Okay, i see. but in the case of docker executor, TASK_KILLING should come 
> after docker stop. Does it sound good??
> 
> Abhishek Dasgupta wrote:
>     Actually, to set the status, we need to send the task_id also. Task_id is 
> not available inside shutdown. Moreover, I don't think it will make any 
> difference if it is called inside shutdown instead of killTask. It makes 
> sense to change the status a TASK_KILLING as soon as killTask is issued.
> 
> Qian Zhang wrote:
>     shutdown() will be not only called by killTask(), but also called when 
> the executor itself is asked to shutdown, so if you send the status in 
> killTask(), that means for the latter case (executor shutdown), the 
> TASK_KILLING status will not be sent?
> 
> Abhishek Dasgupta wrote:
>     So, here is the dubious scenario. If executor shuts down, you can't 
> exepect to provide task_id to shutdown() as there might be lots of tasks. 
> That's why the only argument of shutdown() is executordriver. But to update 
> TASK_KILLING status, you must need task_id. So, in my understanding, shutdown 
> by executor shut down should not require TASK_KILLING status as in that case, 
> all the tasks are unhealthy.
> 
> Ben Mahler wrote:
>     Recall that executors can manage many tasks, the command/docker executors 
> are implementations provided by mesos and they manage a single task only. It 
> is up to the executor to decide how to shutdown, in the case of the command 
> executor we kill the active task and report TASK_KILLED (in both the killTask 
> and shutdown cases):
>     
>     
> https://github.com/apache/mesos/blob/0.27.0/src/launcher/executor.cpp#L514-L516
>     
>     Since we'd like to send a TASK_KILLING when we start to kill a task, we 
> need to send it in both the killTask and shutdown.
>     
>     Make sense?

Make sense to me, but I see this patch has been submitted and TASK_KILLING is 
only sent in killTask but not in shutdown?


- Qian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43489/#review119568
-----------------------------------------------------------


On Feb. 16, 2016, 6:23 p.m., Abhishek Dasgupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43489/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2016, 6:23 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Qian Zhang.
> 
> 
> Bugs: MESOS-4547
>     https://issues.apache.org/jira/browse/MESOS-4547
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> KillTask introduces TASK_KILLING state.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp 654a41db843a85d953880d5145bc95ada9ed2920 
>   src/launcher/executor.cpp c27e0792e4b9bcec0829a46be4232c013d965cf9 
> 
> Diff: https://reviews.apache.org/r/43489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>

Reply via email to