> On May 6, 2016, 12:37 a.m., Adam B wrote:
> > Please create a JIRA with motivation for this hook. I don't want a new hook 
> > to slip into a release without a JIRA in the changelog to document it.
> 
> Kapil Arya wrote:
>     Good point. I meant to add it to the RR, but it slipped :-).

I should have added a "`[WIP]`" to the summary :)


> On May 6, 2016, 12:37 a.m., Adam B wrote:
> > include/mesos/hook.hpp, lines 51-55
> > <https://reviews.apache.org/r/46920/diff/2/?file=1369963#file1369963line51>
> >
> >     Why wouldn't you do this validation at the master? What would a slave 
> > know about validation that the master wouldn't?
> >     Would different slaves validate differently? If so, why isn't that 
> > attribute surfaced in the offer rather than failing on task launch?
> >     Fail early.

Discussed this with Jie offline, and we determined that Isolators are the 
correct way to validate things with the MesosContainerizer.  And because of 
that, this hook should be DockerContainerizer-only.

To answer your questions:

* Presumably, each hook/isolator would be adding functionality as well as 
validating.  Having the agent do validation keeps the logic in one place.
* Agents will always know about the ExecutorInfo, which the master does not 
construct for command tasks.
* A hetergeneous cluster might have agents with different hardware.  i.e. A 
node with no GPUs probably doesn't need GPU-validation logic.
* Presumably, it's up to the operator to distinguish the node via resources, 
attributes, roles, etc.


- Joseph


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


On May 5, 2016, 9:01 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46920/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 9:01 a.m.)
> 
> 
> Review request for mesos, Adam B, Artem Harutyunyan, Jie Yu, and Kapil Arya.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Adds a new hook `slaveRunTaskValidatorHook`, which allows a module to 
> inspect the contents of a task and potentially reject the task with a 
> `TASK_ERROR`.
> 
> 
> Diffs
> -----
> 
>   include/mesos/hook.hpp 210ffba09f5acae34ca49b888a781f683777f9ca 
>   src/examples/test_hook_module.cpp 4b97f84204934d0e678786fd6cde38b89a6f8f48 
>   src/hook/manager.hpp 528674e36639fe78137ba0a4bb004c99730e7a22 
>   src/hook/manager.cpp 381807d582998043d73e9b8c9d3c1fddbcf73cf1 
>   src/slave/slave.cpp 116ea59b72950db4a7cd721b7ba5bfbb2e1c1454 
>   src/tests/hook_tests.cpp 60d52c5849ba555f6f3070883d87aadf105f05b0 
> 
> Diff: https://reviews.apache.org/r/46920/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to