Especially for the tools or the daemons whose config options need
to expand the '$pid', they will be always expanded with the parent
processes. We need to reexpand them in child processes just after
the fork is done.
Fixes: https://tracker.ceph.com/issues/48240
Signed-off-by: Xiubo Li <xiubli@redhat.com>
>=16.0.0
--------
+* $pid expansion in config paths like `admin_socket` will now properly expand
+ to the daemon pid for commands like `ceph-mds` or `ceph-osd`. Previously only
+ `ceph-fuse`/`rbd-nbd` expanded `$pid` with the actual daemon pid.
+
* The allowable options for some "radosgw-admin" commands have been changed.
* "mdlog-list", "datalog-list", "sync-error-list" no longer accepts
}
{
- g_ceph_context->_conf.finalize_reexpand_meta();
common_init_finish(g_ceph_context);
-
+
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
void global_init_postfork_start(CephContext *cct)
{
+ // reexpand the meta in child process
+ cct->_conf.finalize_reexpand_meta();
+
// restart log thread
cct->_log->start();
cct->notify_post_fork();
global_init_postfork_start(g_ceph_context);
}
- g_ceph_context->_conf.finalize_reexpand_meta();
common_init_finish(g_ceph_context);
global_init_chdir(g_ceph_context);