From: root Date: Tue, 26 Dec 2017 10:11:47 +0000 (+0800) Subject: rgw: the metavariables in frontends-related config won't be expanded X-Git-Tag: v13.0.2~701^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19689%2Fhead;p=ceph.git rgw: the metavariables in frontends-related config won't be expanded When using metavariables in frontends-related config, I found that metavariables won't be expanded. Such as: the `name` variable won't be expanded. ``` [client.rgw] rgw frontends = civetweb port=8000 access_log_file=/path/$name.access.log ``` The reason is as follows: In `rgw_main.cc/main()` function, program uses frontends-related config before the `expand_all_meta` function call that is called in the `global_init` function. Signed-off-by: chnmagnus chnmagnus@qq.com --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index d3688e9804a6..aaa57ae0ef31 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -197,6 +197,7 @@ int main(int argc, const char **argv) flags); list frontends; + g_conf->early_expand_meta(g_conf->rgw_frontends, &cerr); get_str_list(g_conf->rgw_frontends, ",", frontends); multimap fe_map; list configs;