> On June 17, 2014, 7:57 p.m., Benjamin Hindman wrote:
> > src/health-check/main.cpp, line 137
> > <https://reviews.apache.org/r/22579/diff/3/?file=610307#file610307line137>
> >
> >     Any reason not to just keep this on stderr? Honestly, it seems like 
> > we'd like to pipe the command's stdout/stderr to our stderr so that it's 
> > part of the stderr file that mesos-executor is writing to. Less moving 
> > parts, less things to discover, and later if people don't want this output 
> > they can tell the mesos-executor to put the data someplace else.

Sounds good, I'll also try to write to stderr.


> On June 17, 2014, 7:57 p.m., Benjamin Hindman wrote:
> > src/health-check/main.cpp, lines 177-178
> > <https://reviews.apache.org/r/22579/diff/3/?file=610307#file610307line177>
> >
> >     It's often helpful to get a bit more information for debuggin by 
> > actually looking at the exit status. I usually pull this from somewhere 
> > else in the code base that is doing this (which means it's probably time 
> > for a helper). I've pulled an example here for you. ;-)
> >     
> >     string message = "Shell command check ";
> >     
> >     if (WIFEXITED(status.get().get())) {
> >       message += " has exited with status ";
> >       message += stringify(WEXITSTATUS(status.get().get()));
> >     } else {
> >       message += " has terminated with signal ";
> >       message += strsignal(WTERMSIG(status.get().get()));
> >     }
> >     
> >     failure(message);

Thanks for the example!


- Timothy


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


On June 17, 2014, 5:59 p.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22579/
> -----------------------------------------------------------
> 
> (Updated June 17, 2014, 5:59 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Added task health check process that is launched with the command executor if 
> health check is configured.
> It runs configured health check command and return the status to the executor 
> to report the task health. The executor also reports the task health status 
> back to the scheduler.
> 
> The task health process keeps internal state based on health check 
> configuration, and determine when the task it is checking for should be 
> killed. Currently it's based on the number of consecutive failures it 
> observed. Once the condition meets it sends a task health status update with 
> a kill task flag turned on, and the executor will kill the task.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 709b8b1 
>   src/Makefile.am 3e623cc 
>   src/common/type_utils.hpp 784a808 
>   src/health-check/main.cpp PRE-CREATION 
>   src/launcher/executor.cpp 3d55d93 
>   src/messages/messages.proto 8aecc8b 
>   src/slave/http.cpp cd7f692 
>   src/slave/slave.cpp bc976b7 
>   src/tests/health_check_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22579/diff/
> 
> 
> Testing
> -------
> 
> Added unit tests and make check.
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>

Reply via email to