]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crushtool: do not release g_ceph_context at exit 11733/head
authorKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 11:45:57 +0000 (19:45 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 24 Nov 2016 14:38:28 +0000 (22:38 +0800)
it is but a work around of occasionally timeout.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/crushtool.cc

index 19b970aed1a7a37bbf7e8f821422e569ad6fff3e..1510bc84386c2ea6b93e8d10eee1f77fdb46d2d2 100644 (file)
@@ -274,6 +274,9 @@ int main(int argc, const char **argv)
   auto cct = global_init(NULL, env_args, CEPH_ENTITY_TYPE_CLIENT,
                         CODE_ENVIRONMENT_UTILITY,
                         CINIT_FLAG_NO_DEFAULT_CONFIG_FILE);
+  // crushtool times out occasionally when quits. so do not
+  // release the g_ceph_context.
+  cct->get();
   common_init_finish(g_ceph_context);
 
   int x;