From: Sage Weil Date: Sun, 7 Apr 2013 16:06:23 +0000 (-0700) Subject: global: call config observers on global_init (and start logging!) X-Git-Tag: v0.61~220^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a30917746614275baeb718e902133f06ef44fba6;p=ceph.git global: call config observers on global_init (and start logging!) Currently we don't start logging on daemon startup unless the log_file parameter was adjusted by ceph.conf. Instead, we should call all config observers so that the logging subsystem is fully configured and we log even prior to the daemonize and common_init_finish (when we call observers again). This fixes logging for the initial period before we daemonize. For some of the daemons (osd, mon), this includes significant work. It also fixes the problem where users don't see the 'ceph version ...' banner on daemon start. Backport: bobtail Signed-off-by: Sage Weil --- diff --git a/src/global/global_init.cc b/src/global/global_init.cc index 0f7179c39df..9a77e734801 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -106,6 +106,10 @@ void global_init(std::vector < const char * > *alt_def_args, std::vector < const g_lockdep = cct->_conf->lockdep; + // call all observers now. this has the side-effect of configuring + // and opening the log file immediately. + conf->call_all_observers(); + // Now we're ready to complain about config file parse errors complain_about_parse_errors(cct, &parse_errors);