]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crushtool: do not release g_ceph_context at exit
authorKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 11:45:57 +0000 (19:45 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 25 Apr 2017 13:47:59 +0000 (15:47 +0200)
it is but a work around of occasionally timeout.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d305cc51b18cbf4b2757bbacb5d43324461306a9)

src/tools/crushtool.cc

index 65e1f1223d74a27a5f60c48c4dd369a598c94fab..bf67530e3b0760399266ea787fb915716f6d1ce1 100644 (file)
@@ -273,6 +273,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;