All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karol Mroz <kmroz@suse.com>
To: Sage Weil <sage@newdream.net>
Cc: ceph-devel@vger.kernel.org
Subject: Re: logfile created with root:root ownership when "log_file" config option specified
Date: Fri, 5 Feb 2016 18:09:35 -0800	[thread overview]
Message-ID: <20160206020935.GC29769@oak.lan> (raw)
In-Reply-To: <alpine.DEB.2.11.1602052051140.28396@cpach.fuggernut.com>

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2016-02-06  2:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 23:17 logfile created with root:root ownership when "log_file" config option specified Karol Mroz
2016-02-06  0:46 ` Karol Mroz
2016-02-06  2:02   ` Sage Weil
2016-02-06  2:09     ` Karol Mroz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160206020935.GC29769@oak.lan \
    --to=kmroz@suse.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@newdream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.