]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
global: reexpand the conf meta in all the child processes
authorXiubo Li <xiubli@redhat.com>
Fri, 13 Nov 2020 08:08:31 +0000 (16:08 +0800)
committerNathan Cutler <ncutler@suse.com>
Wed, 27 Jan 2021 20:45:06 +0000 (21:45 +0100)
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>
(cherry picked from commit 73a48dfe8ed165cb6c8295a88f133acb30e7065e)

Conflicts:
PendingReleaseNotes

PendingReleaseNotes
src/ceph_fuse.cc
src/global/global_init.cc
src/tools/rbd_nbd/rbd-nbd.cc

index acbe6dcc4297913ebd0f7f49587ad804cfd1d2ae..fff5c5d6d3cd75ccb27ab2eaa0d08ca6c62867a4 100644 (file)
@@ -1,25 +1,6 @@
-14.2.16
+14.2.17
 -------
 
-* The structured output of ``ceph status`` or ``ceph -s`` is now more
-  concise, particularly the ``mgrmap`` and ``monmap`` sections, and the
-  structure of the ``osdmap`` section has been cleaned up.
-
-* MON: The cluster log now logs health detail every ``mon_health_to_clog_interval``,
-  which has been changed from 1hr to 10min. Logging of health detail will be
-  skipped if there is no change in health summary since last known.
-
-
-14.2.15
--------
-
-* MGR: progress module can now be turned on/off, using the commands:
-  ``ceph progress on`` and ``ceph progress off``.
-
-
-14.2.13
--------
-
-* This release fixes a regression introduced in 14.2.12 which broke deployments
-  that referred to MON hosts using DNS names instead of IP addresses in the
-  ``mon_host`` parameter in ``/etc/ceph/ceph.conf``.
+* $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.
index 9d6141c1eaa4c5434b4d0174bbaffc53c100a6e0..8b8292c2ace98e553247ed0ad7b9ea29232473a6 100644 (file)
@@ -167,9 +167,8 @@ int main(int argc, const char **argv, const char *envp[]) {
   }
 
   {
-    g_ceph_context->_conf.finalize_reexpand_meta();
     common_init_finish(g_ceph_context);
-   
+
     init_async_signal_handler();
     register_async_signal_handler(SIGHUP, sighup_handler);
 
index 8f6a60f54ebe4655861d664c5cc72e60c69e8eec..7ab7e0110fb99d972bb8dcf964dfac143f84790a 100644 (file)
@@ -480,6 +480,9 @@ int reopen_as_null(CephContext *cct, int fd)
 
 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();
index a2e5fdeebfb3eeb5a49102c84957ae7aa51c86ca..42dc92ad866d3b8051e3f89108374e45cf4ba866 100644 (file)
@@ -1159,7 +1159,6 @@ static int do_map(int argc, const char *argv[], Config *cfg)
     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);