]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-mon: reset process name to 'ceph-mon' on startup 26797/head
authorSage Weil <sage@redhat.com>
Wed, 6 Mar 2019 19:49:50 +0000 (13:49 -0600)
committerSage Weil <sage@redhat.com>
Wed, 6 Mar 2019 19:49:50 +0000 (13:49 -0600)
After a respawn the process name ends up as 'exe' (because we do execve
on /proc/$pid/exe).  Reset to 'ceph-mon' so that killall works.

Fixes: http://tracker.ceph.com/issues/38604
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph_mon.cc

index 0f9224e5b033360691e3263839daa07c2cb708e0..f51dce57e62f1aaebd572018deb29b673ae2f421 100644 (file)
@@ -203,6 +203,10 @@ entity_addrvec_t make_mon_addrs(entity_addr_t a)
 
 int main(int argc, const char **argv)
 {
+  // reset our process name, in case we did a respawn, so that it's not
+  // left as "exe".
+  ceph_pthread_setname(pthread_self(), "ceph-mon");
+
   int err;
 
   bool mkfs = false;