From: Yehuda Sadeh Date: Sat, 29 Feb 2020 02:48:51 +0000 (-0800) Subject: rgw: move frontends initial init to after global_init() X-Git-Tag: v15.1.1~123^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e28718eaa18e49c770db45820b591088ea92846b;p=ceph.git rgw: move frontends initial init to after global_init() So that central config could be used Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 56000999484f..a3ca40e2cdf3 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -202,15 +202,24 @@ int radosgw_Main(int argc, const char **argv) exit(0); } - // First, let's determine which frontends are configured. int flags = CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS; global_pre_init( &defaults, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, flags); + // Now that we've determined which frontend(s) to use, continue with global + // initialization. Passing false as the final argument ensures that + // global_pre_init() is not invoked twice. + // claim the reference and release it after subsequent destructors have fired + auto cct = global_init(&defaults, args, CEPH_ENTITY_TYPE_CLIENT, + CODE_ENVIRONMENT_DAEMON, + flags, "rgw_data", false); + + // First, let's determine which frontends are configured. list frontends; - g_conf().early_expand_meta(g_conf()->rgw_frontends, &cerr); - get_str_list(g_conf()->rgw_frontends, ",", frontends); + string rgw_frontends_str = g_conf().get_val("rgw_frontends"); + g_conf().early_expand_meta(rgw_frontends_str, &cerr); + get_str_list(rgw_frontends_str, ",", frontends); multimap fe_map; list configs; if (frontends.empty()) { @@ -248,14 +257,6 @@ int radosgw_Main(int argc, const char **argv) fe_map.insert(pair(framework, config)); } - // Now that we've determined which frontend(s) to use, continue with global - // initialization. Passing false as the final argument ensures that - // global_pre_init() is not invoked twice. - // claim the reference and release it after subsequent destructors have fired - auto cct = global_init(&defaults, args, CEPH_ENTITY_TYPE_CLIENT, - CODE_ENVIRONMENT_DAEMON, - flags, "rgw_data", false); - int numa_node = g_conf().get_val("rgw_numa_node"); size_t numa_cpu_set_size = 0; cpu_set_t numa_cpu_set;