mirror of
https://github.com/ceph/ceph
synced 2024-12-28 14:34:13 +00:00
common: expand meta in parse_argv()
it fixes the issue where the conf->foo fails to expand if it is set as "$bar" in a .conf file, and "bar" is another config var, and bar is set using config_proxy.parse_argv(). because before773ef117
, apply_changes() calls update_legacy_vals(), which expand meta vars for legacy config vals, but after773ef117
, we cannot change config_values in apply_changes() anymore. so update_legacy_vals() calls is moved to apply_changes()'s callers accordingly. but the apply_changes() is also called by global_init() directly instead of by the routines in config.cc. so in773ef117
, i missed it. in this change, it's put back into parse_argv() instead of into global_init(), as update_legacy_vals() is a low level function, and parse_argv() could change the config_values, it's better to call update_legacy_vals() out there, just like set_mon_vals() and parse_config_files(). Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
16922bea46
commit
2a565ee35d
@ -609,6 +609,8 @@ int md_config_t::parse_argv(ConfigValues& values,
|
||||
}
|
||||
}
|
||||
}
|
||||
// meta expands could have modified anything. Copy it all out again.
|
||||
update_legacy_vals(values);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user