On Fri, Feb 05, 2016 at 09:02:58PM -0500, Sage Weil wrote: [...] > > The more I look at it, the more I think running conf->handle_changes(NULL) from global_pre_init() > > is not needed. Upon returning to global_init(), we invoke g_conf->call_all_observers() which does > > meta variable expansion and runs _all_ observers. This should be enough... or am I oversimplifying > > things? :D > > That sounds like the right thing to me. These are dark and crufty parts > of the code, though, so we'll have to make the change and see what > breaks.. > > There are only 2 global_pre_init callers: global_init (the next method > down), and ceph-conf. Presumably this was split to make ceph-conf happy. > So this is primarily a matter of looking through global_init to make sure > nothing depends on metavariable expansion. The only thing htat catches my > eye is g_conf->run_dir. We can probably move that below > call_all_observers? Or, put the apply_changes just after we drop > privileges. > > Take a look at > > https://github.com/ceph/ceph/pull/7545 > > I think this does the trick, and passes my quick smoke test... Yes, this looks good. One thing... before the logfile is ultimately created, there are several potential calls to dout(). Is it possible these calls would be lost? Or is there some caching that goes on? I've not looked too deeply at the logging code. Thanks! -- Regards, Karol
Attachment:
signature.asc
Description: Digital signature