All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@42on.com>
To: Sage Weil <sage@newdream.net>
Cc: Haomai Wang <haomaiwang@gmail.com>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: /var/lib/ceph/*/*/config
Date: Wed, 27 Jan 2016 17:03:57 +0100	[thread overview]
Message-ID: <56A8EA6D.1030808@42on.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1601271042590.6524@cpach.fuggernut.com>



On 27-01-16 16:45, Sage Weil wrote:
> On Wed, 27 Jan 2016, Wido den Hollander wrote:
>> On 27-01-16 15:59, Sage Weil wrote:
>>> Loic pointed out that adding a new config file that is overrides/combines 
>>> with the global config makes our already-complicated config infrastructure 
>>> even more so.  And it turned out to be more complicated to implement than 
>>> I'd hoped.  On the other hand, I think there are valid use-cases for a 
>>> global config, e.g.:
>>>
>>>  - most config on the osd disk itself
>>>  - /etc/ceph/ceph.conf containing crush_location and mon_host
>>>
>>> ...and with a single config I'm not sure how we'd get the datacenter 
>>> location set properly.
>>>
>>
>> Yes, you probably want the mon_host variable in a global config. We
>> might and I say *might* want to look at a DNS lookup at some time?
>>
>> A lookup for 'ceph-monitor' in the current DNS search domain. But that
>> might be offtopic here.
> 
> Yeah, I think if we make standard practice setting up DNS with an A or 
> AAAA record for each monitor then we can avoid a global mon_host.  But 
> there's still the crush location piece...
>  

Yes. I created a issue for that: http://tracker.ceph.com/issues/14527

>>> Anyway, I have two versions implemented.  The first just adds 
>>> $data_dir/config to the search pathh:
>>>
>>> 	https://github.com/ceph/ceph/pull/7377
>>>
>>
>> I like the first patch, but it doesn't seem to merge the config files,
>> right?
>>
>> If a global /etc/ceph/ceph.conf is found it doesn't search any further.
>>
>>> The second adds the extra_config infrastructure.  It's just the last patch 
>>> that is different:
>>>
>>> 	https://github.com/ceph/ceph/pull/7378
>>>
>>
>> The --extra-config seems weird to me. Isn't there a way where you supply
>> --config multiple times with multiple files?
> 
> Right now config is a search path, and when it finds a match, it stops and 
> uses that config file exclusively.  extra_config is a way to merge two of 
> them.  I agree it's not ideal...
> 
> An alternative approach would be to support 'include <file>' so that the 
> $data_dir/config, if present, would include something from /etc/ceph.
> 

I think that a include would be much nicer. I filed a issue for that
some time ago: http://tracker.ceph.com/issues/4771

The default config we created for a daemon could be just a one-liner:


/var/lib/ceph/osd/ceph-0/ceph.conf:

include "/etc/ceph/ceph.conf"

Wido

> sage
> 

  reply	other threads:[~2016-01-27 16:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 15:15 /var/lib/ceph/*/*/config Sage Weil
2016-01-19 15:34 ` /var/lib/ceph/*/*/config Wido den Hollander
2016-01-19 15:48 ` /var/lib/ceph/*/*/config Allen Samuels
     [not found] ` <CACJqLyaMC-UaAhTnzCeUqPCoY3HcoqLwHg3tpWW0H-+6AN6C7Q@mail.gmail.com>
2016-01-19 16:46   ` /var/lib/ceph/*/*/config Sage Weil
2016-01-19 16:55     ` /var/lib/ceph/*/*/config Haomai Wang
2016-01-27 14:59     ` /var/lib/ceph/*/*/config Sage Weil
2016-01-27 15:24       ` /var/lib/ceph/*/*/config Wido den Hollander
2016-01-27 15:45         ` /var/lib/ceph/*/*/config Sage Weil
2016-01-27 16:03           ` Wido den Hollander [this message]
2016-01-27 16:29             ` /var/lib/ceph/*/*/config Haomai Wang
2016-01-20 10:42 ` /var/lib/ceph/*/*/config John Spray
2016-01-21  6:15   ` /var/lib/ceph/*/*/config Wang, Yaguang

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=56A8EA6D.1030808@42on.com \
    --to=wido@42on.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=haomaiwang@gmail.com \
    --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.