]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-mgr: threads after fork
authorSage Weil <sage@redhat.com>
Mon, 6 Mar 2017 23:07:09 +0000 (18:07 -0500)
committerSage Weil <sage@redhat.com>
Wed, 29 Mar 2017 15:39:25 +0000 (11:39 -0400)
MgrStandby contains an Objecter with a ceph_timer and
associated thread.  Create it after we fork.

Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph_mgr.cc

index acdddec194eea91769995871a35380482b1891b9..c3fcc276c79a824e8548f4acc9d3e241d3ca66e3 100644 (file)
@@ -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;