> On May 15, 2014, 1:41 a.m., Ben Mahler wrote:
> > src/messages/messages.proto, line 262
> > <https://reviews.apache.org/r/21379/diff/1/?file=579745#file579745line262>
> >
> >     I'm not sure why signals are being introduced here? This message is 
> > sent from the Master to the Slave, but the master does not need to send a 
> > 'signal' number to the slave, right?
> 
> Alexandra Sava wrote:
>     Yes it's true, but I tried removing the signal parameter from 
> message.proto file (and also from where the protobuf handlers are installed 
> in slave.cpp) and I receive a compile error because the compiler does not 
> find a method with "Slave::shutdown(const UPID& from, const string& message)" 
> signature.
> 
> Ben Mahler wrote:
>     This is likely because 'shutdown' is being used as both a message handler 
> and as a function that you're now dispatching to. We definitely don't want 
> these in the protobuf messages since they have no meaning there.

I created special methods for handling shutdown messages from the master. I 
think it is more appropriate to have a shutdown method that can be called in 
any scenario (shutdown issued by the master / SIGUSR1 signal) and handlers for 
the messages that expose the right parameters to the master.


- Alexandra


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


On May 22, 2014, 3:37 p.m., Alexandra Sava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21379/
> -----------------------------------------------------------
> 
> (Updated May 22, 2014, 3:37 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-544
>     https://issues.apache.org/jira/browse/MESOS-544
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> First phase: Mesos-slave support for "node drain" 
>                                                                               
>                   
> This phase handles the shutdown of the slave, triggered by SIGUSR1 signal:
> * implement a signal handler which is invoked when SIGUSR1 signal is issued
> * the signal handler will call the 'shutdown' method from the Slave class, 
> which  shuts down all the frameworks and executors that run on the slave.
> 
> In the next phase, the slave will send an unregistration request to the 
> master in order to overcome the lag of the health check timer (75 sec).  
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.hpp 769bd00f1464c9935416f044fd834e2187d83a6e 
>   src/slave/slave.cpp a4b9570c0b4f1b56180888ef975add4c8c3cbee7 
> 
> Diff: https://reviews.apache.org/r/21379/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexandra Sava
> 
>

Reply via email to