From 27c844d77c83e3b0ac5821867295d13adfebd6bc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 31 Jan 2018 16:33:44 -0600 Subject: [PATCH] common/config: tweak order of env parsing CEPH_ARGS is half-way between env and cmdline; parse it at the end of env. Signed-off-by: Sage Weil --- src/common/config.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/config.cc b/src/common/config.cc index d0eefe66b5c0a..1bbcfb463e173 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -469,11 +469,6 @@ void md_config_t::parse_env(const char *args_var) string k = getenv("CEPH_KEYRING"); values["keyring"][CONF_ENV] = Option::value_t(k); } - if (getenv(args_var)) { - vector env_args; - env_to_vec(env_args, args_var); - parse_argv(env_args, CONF_ENV); - } if (const char *dir = getenv("CEPH_LIB")) { Mutex::Locker l(lock); for (auto name : { "erasure_code_dir", "plugin_dir", "osd_class_dir" }) { @@ -483,6 +478,11 @@ void md_config_t::parse_env(const char *args_var) _set_val(dir, *o, CONF_ENV, &err); } } + if (getenv(args_var)) { + vector env_args; + env_to_vec(env_args, args_var); + parse_argv(env_args, CONF_ENV); + } } void md_config_t::show_config(std::ostream& out) -- 2.39.5