----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21379/#review44216 -----------------------------------------------------------
Looks great Alexandra, I wonder if the following would be simpler: (1) Leave shutdown and shutdownFramework untouched. (2) Add Slave::signaled(int signal) that LOGs as you've done, but dispatches to the existing 'shutdown' with a message saying "Received SIGUSR1 signal". This is similar to what we did for authentication where we call: shutdown(UPID(), "Master refused authentication"); Another suggestion: Do we want to use SA_SIGINFO to receive a siginfo_t? That way, we could pass the uid of the sender into the slave's signal handler, at which point we could use os::user to try to log who send the signal. - Ben Mahler 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 > >
