> On March 10, 2017, 8:05 a.m., Jiang Yan Xu wrote:
> > src/slave/slave.cpp
> > Line 1807 (original), 1832-1834 (patched)
> > <https://reviews.apache.org/r/55887/diff/9/?file=1659468#file1659468line1836>
> >
> >     As discussed offline, the overall logic about `_run` continuations is 
> > probably simpler if we can pull this out to not conditional on the result 
> > of `future` so the method has these parts
> >     
> >     1. Put the task or task group in a common list `tasks`.
> >     2. Return if the framework is gone.
> >     3. If the framework is terminating, clean up `tasks` from 
> > `framwork->pending` and return.
> >     4. If some tasks are killed, clean up all `tasks` from 
> > `framwork->pending`, send TASK_KILLED and return.
> >     5. Check the result of the previous step ...
> >     
> >     
> >     In fact, step 1-4 should probably be identical for `_run` and `__run` 
> > and a good candidate for refactoring (maybe in a follow up patch).

Updated. We can consolidate the steps in a single function in a separate patch.


- Anindya


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


On March 10, 2017, 10:15 p.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55887/
> -----------------------------------------------------------
> 
> (Updated March 10, 2017, 10:15 p.m.)
> 
> 
> Review request for mesos, Adam B, Anand Mazumdar, Alexander Rojas, and Jiang 
> Yan Xu.
> 
> 
> Bugs: MESOS-6953
>     https://issues.apache.org/jira/browse/MESOS-6953
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added support for action `run_tasks` on the agent's flag `acl`. Based on
> the ACL configured for `run_tasks`, a task to be launched on the agent
> can be (dis)allowed to launch on the agent.
> If a task or task group cannot be launched due to failed authorization,
> a `TASK_ERROR` Status Update shall be sent with a reason code of
> `REASON_TASK_UNAUTHORIZED` or `REASON_TASK_GROUP_UNAUTHORIZED` as
> applicable.
> Note that in case of a task group, all tasks fail if any of the tasks
> within the task group encounter the authorization error.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.hpp 978edd6309dfbbde1058f9c44d5fac7083ff95fb 
>   src/slave/slave.cpp 2308d5bf1fef5e1a6458a3bb742a16935a127929 
> 
> 
> Diff: https://reviews.apache.org/r/55887/diff/10/
> 
> 
> Testing
> -------
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>

Reply via email to