From: Sage Weil Date: Mon, 6 Mar 2017 23:07:09 +0000 (-0500) Subject: ceph-mgr: threads after fork X-Git-Tag: v12.0.2~252^2~49 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c21532bf7b7449b574a814d5b1203f0e3a191fb;p=ceph.git ceph-mgr: threads after fork MgrStandby contains an Objecter with a ceph_timer and associated thread. Create it after we fork. Signed-off-by: Sage Weil --- diff --git a/src/ceph_mgr.cc b/src/ceph_mgr.cc index acdddec194ee..c3fcc276c79a 100644 --- a/src/ceph_mgr.cc +++ b/src/ceph_mgr.cc @@ -41,10 +41,9 @@ int main(int argc, const char **argv) // For consumption by KeyRing::from_ceph_context in MonClient g_conf->set_val("keyring", "$mgr_data/keyring", false); - MgrStandby mgr; - // Handle --help if ((args.size() == 1 && (std::string(args[0]) == "--help" || std::string(args[0]) == "-h"))) { + MgrStandby mgr; mgr.usage(); return 0; } @@ -53,6 +52,7 @@ int main(int argc, const char **argv) global_init_chdir(g_ceph_context); common_init_finish(g_ceph_context); + MgrStandby mgr; int rc = mgr.init(); if (rc != 0) { std::cerr << "Error in initialization: " << cpp_strerror(rc) << std::endl;