From 5cded0a64f111cdf8ea8953f34418c482603c31b Mon Sep 17 00:00:00 2001 From: root Date: Tue, 26 Dec 2017 18:11:47 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index d3688e9804a6f..aaa57ae0ef314 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; -- 2.47.3