mirror of
https://github.com/ceph/ceph
synced 2025-03-24 11:17:53 +00:00
config: make $pid a metavariable
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
aa37fe769d
commit
cf2a045402
@ -900,7 +900,7 @@ int md_config_t::set_val_raw(const char *val, const config_option *opt)
|
||||
}
|
||||
|
||||
static const char *CONF_METAVARIABLES[] =
|
||||
{ "cluster", "type", "name", "host", "num", "id" };
|
||||
{ "cluster", "type", "name", "host", "num", "id", "pid" };
|
||||
static const int NUM_CONF_METAVARIABLES =
|
||||
(sizeof(CONF_METAVARIABLES) / sizeof(CONF_METAVARIABLES[0]));
|
||||
|
||||
@ -976,6 +976,8 @@ bool md_config_t::expand_meta(std::string &origval) const
|
||||
out += name.get_id().c_str();
|
||||
else if (var == "id")
|
||||
out += name.get_id().c_str();
|
||||
else if (var == "pid")
|
||||
out += stringify(getpid());
|
||||
else
|
||||
assert(0); // unreachable
|
||||
found_meta = true;
|
||||
|
Loading…
Reference in New Issue
Block a user