> On Oct. 15, 2014, 6:01 p.m., Ankur Chauhan wrote:
> > src/docker/docker.cpp, line 479
> > <https://reviews.apache.org/r/26736/diff/1/?file=721615#file721615line479>
> >
> >     I did some digging around in the docker source 
> >     
> >     
> > https://sourcegraph.com/github.com/docker/docker/.GoPackage/github.com/docker/docker/daemon/.def/Container/Stop/.share
> >     
> >     And it seems like we are safe to call stop with any value 
> > (negative/zero/positive). And the SIGTERM gracefully degrades to a kill it 
> > fails.
> >     
> >     We could simplify the code further by always calling stop and 
> > completely dropping the kill code path.

It looks like the WaitStop function in docker will wait forever if it is 
supplied with a negative value, so I think we should keep the negative check in.

Otherwise I agree with simplifying it, a 0 timeout will essentially drop 
straight into a kill.


- Ryan


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


On Oct. 15, 2014, 10:58 a.m., Ryan Thomas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26736/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2014, 10:58 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-1925
>     https://issues.apache.org/jira/browse/MESOS-1925
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Ensure docker calls stop if a docker_stop_timeout is provided Added the flag 
> docker_stop_timeout that defaults to 0, if the timeout is 0 the a docker kill 
> will be run, otherwise a docker stop with the timeout in seconds is used. A 
> negative value will result in a Failure.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp 9656f15547a522f9866c28c78d431508771c795a 
>   src/docker/docker.cpp e09b51c4f5101c3a8e77caf12b208c88f47fbcb2 
>   src/slave/containerizer/docker.cpp 9a2948951f57f3ab16291df51cd9f33e5e96add4 
>   src/slave/flags.hpp 16f0cc2ab5ba16a39499608174278b3082e0585d 
>   src/tests/docker_containerizer_tests.cpp 
> 67d60a885d65edbcbbf702bce83a54d1a5c0411f 
>   src/tests/docker_tests.cpp 04139af2c377226554d53e9dbce93868da1dc1ba 
> 
> Diff: https://reviews.apache.org/r/26736/diff/
> 
> 
> Testing
> -------
> 
> make check
> sudo bin/mesos-tests.sh --gtest_filter="DOCKER" --verbose 
> support/mesos-style.py
> 
> 
> Thanks,
> 
> Ryan Thomas
> 
>

Reply via email to