mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Chen" <tnac...@apache.org>
Subject Re: Review Request 33249: Send statusUpdate to scheduler on containerizer launch failure
Date Fri, 17 Apr 2015 00:45:03 GMT


> On April 16, 2015, 5:34 p.m., Timothy Chen wrote:
> > src/tests/containerizer.cpp, line 95
> > <https://reviews.apache.org/r/33249/diff/1/?file=931232#file931232line95>
> >
> >     How about setting a flag in the TestContainerizer constructor that tells it
to send a failure on launch? Checking value like is too implicit, and someone else might not
know the magic meaning on the other side (as I don't see any comment in the test to mark that
this has sepecial meaning).
> 
> Jay Buffington wrote:
>     Are there other examples of inducing failure other places in the test suite?

There are different ways we've done this, sometimes we set up mock using gmock, and override
the return to be Failures (EXPECT_CALL.....).
Sometimes we setup flags, etc. In your case actually I think you could use the MockContainerizer
instead and do EXPECT_CALL(*containerizer, launch(.....).WillOnce(Return(Failure(...))) in
your test code.


- Timothy


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


On April 16, 2015, 3:16 p.m., Jay Buffington wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33249/
> -----------------------------------------------------------
> 
> (Updated April 16, 2015, 3:16 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Timothy Chen, and Vinod Kone.
> 
> 
> Bugs: MESOS-2020
>     https://issues.apache.org/jira/browse/MESOS-2020
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When mesos is unable to launch the containerizer the scheduler should
> get a TASK_FAILED with a status message that includes the error the
> containerizer encounted when trying to launch.
> 
> Introduces a new TaskStatus: REASON_CONTAINERIZER_LAUNCH_FAILED
> 
> Fixes MESOS-2020
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 3a8e8bf303e0576c212951f6028af77e54d93537 
>   src/slave/slave.cpp a0595f93ce4720f5b9926326d01210460ccb0667 
>   src/tests/containerizer.cpp 26b87ac6b16dfeaf84888e80296ef540697bd775 
>   src/tests/slave_tests.cpp b826000e0a4221690f956ea51f49ad4c99d5e188 
> 
> Diff: https://reviews.apache.org/r/33249/diff/
> 
> 
> Testing
> -------
> 
> I added test case to slave_test.cpp.  I also tried this with Aurora, supplied a bogus
docker image url and saw the "docker pull" failure stderr message in Aurora's web UI.
> 
> 
> Thanks,
> 
> Jay Buffington
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message