> On March 18, 2014, 11:58 a.m., Ian Downes wrote:
> > src/slave/main.cpp, line 138
> > <https://reviews.apache.org/r/19263/diff/3/?file=522993#file522993line138>
> >
> >     Why can't these additional checks be done in Containerizer::resources 
> > (in slave/containerizer/containerizer.cpp) and then you can return Error() 
> > according to these new checks?
> 
> ASHUTOSH JAIN wrote:
>     just wanted to confirm if Error() would exit the code stating wrong mem 
> or just output a warning.
>     If it exits, then we could move the check part to containerizer.cpp.

+1 on moving the check to Containerizer::resources(). That would definitely 
make the new checks easier to unit test.
Ashutosh: If you run into an error (eg. parsing, or exceeds main memory size) 
during Containerizer::resources(), it will return a Try<Resources> with a value 
of Error("error message"). Rather than calling Containerizer::resources() 
directly from slave/main.cpp and checking for isError() on the return value, 
you can probably just rely on Slave::initialize() which already calls 
Containerizer::resources() and Exit()s if _resources.isError().


- Adam


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


On March 17, 2014, 10:21 a.m., ASHUTOSH JAIN wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19263/
> -----------------------------------------------------------
> 
> (Updated March 17, 2014, 10:21 a.m.)
> 
> 
> Review request for mesos, Adam B, Adam Berry, and Ben Mahler.
> 
> 
> Bugs: MESOS-969
>     https://issues.apache.org/jira/browse/MESOS-969
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> resources (mem) provided by user not being checked
> 
> link to issue:  https://issues.apache.org/jira/browse/MESOS-969
> 
> 
> Diffs
> -----
> 
>   src/slave/main.cpp 8c2b70c 
> 
> Diff: https://reviews.apache.org/r/19263/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> ASHUTOSH JAIN
> 
>

Reply via email to