From: Yan Jun Date: Mon, 20 Jun 2016 06:37:23 +0000 (+0800) Subject: rgw: check result of rgw_tools_init X-Git-Tag: v11.0.0~5^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91eca9e22ff2e831229098e8eff16889b5fb9d19;p=ceph.git rgw: check result of rgw_tools_init Maybe we should handle the error return code Signed-off-by: Yan Jun --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 7339c7a581f5..ef8f7f762ae1 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -287,7 +287,11 @@ int main(int argc, const char **argv) // claim the reference and release it after subsequent destructors have fired boost::intrusive_ptr cct(g_ceph_context, false); - rgw_tools_init(g_ceph_context); + int r = rgw_tools_init(g_ceph_context); + if (r < 0) { + derr << "ERROR: unable to initialize rgw tools" << dendl; + return -r; + } rgw_init_resolver(); @@ -295,7 +299,6 @@ int main(int argc, const char **argv) FCGX_Init(); - int r = 0; RGWRados *store = RGWStoreManager::get_storage(g_ceph_context, g_conf->rgw_enable_gc_threads, g_conf->rgw_enable_quota_threads, g_conf->rgw_run_sync_thread);