diff options
author | Yan Jun <yan.jun8@zte.com.cn> | 2016-06-20 08:37:23 +0200 |
---|---|---|
committer | Yan Jun <yan.jun8@zte.com.cn> | 2016-06-20 08:37:23 +0200 |
commit | 91eca9e22ff2e831229098e8eff16889b5fb9d19 (patch) | |
tree | dfa50bbcd6dc6285efc77357db29bc9e6c26fbb4 /src/rgw/rgw_main.cc | |
parent | Merge pull request #9804 from ceph/revert-9801-msg_msg_types_entity_name_t_ma... (diff) | |
download | ceph-91eca9e22ff2e831229098e8eff16889b5fb9d19.tar.xz ceph-91eca9e22ff2e831229098e8eff16889b5fb9d19.zip |
rgw: check result of rgw_tools_init
Maybe we should handle the error return code
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
Diffstat (limited to 'src/rgw/rgw_main.cc')
-rw-r--r-- | src/rgw/rgw_main.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 7339c7a581f..ef8f7f762ae 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<CephContext> 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); |