couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Runtime Configuration #1
Date Tue, 13 May 2008 11:34:17 GMT
a couple of combined replies on this thread:

On May 11, 2008, at 16:03, Noah Slater wrote:
> On Sat, May 10, 2008 at 04:00:20PM +0200, Christopher Lenz wrote:
>> I'd personally prefer to see branches for such things.
> +1

I have created branches/runtimeconfig for future work

>> $ curl -X GET http://localhost:5984/_config/httpd/port
>> {"ok":true,"module":"httpd","key":"port","value":"no_value"}
> Should `"no_value"' not be `nil'?


On Apr 24, 2008, at 23:12, Damien Katz wrote:

> No special couchdb code should be in the config module. So the code  
> for formating and dumping to std out and the code for creating a  
> default couchdb configuration should still be in couch_server_sup or  
> maybe couch_server. But not in couch_config.

fixed. In fact, the dumping is not yet re-introduced.

> Actually there should be no single "default settings" code body,  
> each module should deal with missing configuration settings on its  
> own. And its fine if they don't handle the case of missing settings  
> data and just fail.

all gone.

> Make your changes and repost for review. Also, when submitting code  
> for review here just go ahead an include the diffs right into the  
> posting, it will make commenting on individual bits of code easier.

I created a branch. see above :)

This version introduces a new feature we've been discussing on IRC:
The final config system will be able to write changes that were
made through the HTTP API back to the couch.ini file for persistence.
To be on the safe side and don't leave a user hanging in case he
misconfigures his CouchDB, we want to use two ini files. One
with default values that we ship with and never change and another
one where the user can make his changes by hand and where the
changes via the HTTP API get written to. To accommodate this,
on startup, CouchDB (more specifically couch_server:start()) now
receives a list of full paths to any number of ini files that are  
By convention, the last specified ini file (if it is not the fist)  
will be used
to write back the changes that are made though the HTTP API).

Noah: I mocked up bin/couchdb(.tpl(.in)) to suport this, all you need
to add is the parsing of the -c flag.

Please test the new branch and let me know what you think.

Note: this is still a moving target and things like auto-rewrite ini- 
is not yet in.


View raw message