summaryrefslogtreecommitdiff
path: root/src/ceph_mon.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-20 08:49:48 -0700
committerSage Weil <sage@inktank.com>2013-07-20 08:49:48 -0700
commitc3acc256088a3da36c964d149263058ec647b6b2 (patch)
treebc114b274b18b4e91a853dfb3a59647782e00207 /src/ceph_mon.cc
parent7e25fecdfeb3d558fcffcbcff64615d16cc83800 (diff)
downloadceph-c3acc256088a3da36c964d149263058ec647b6b2.tar.gz
mon, mds, osd: add early SIGTERM injection
This makes it easy to identify problems with (early) shutdown with a loop like while [ ! -e core ] ; do ./ceph-mds -i a -c ceph.conf -f ; done and a vstart cluster. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/ceph_mon.cc')
-rw-r--r--src/ceph_mon.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index f247de8cdfb..35ed56a7985 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -552,6 +552,9 @@ int main(int argc, const char **argv)
register_async_signal_handler_oneshot(SIGINT, handle_mon_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_mon_signal);
+ if (g_conf->inject_early_sigterm)
+ kill(getpid(), SIGTERM);
+
messenger->wait();
unregister_async_signal_handler(SIGHUP, sighup_handler);