[Pdns-users] Some details for multiple (gmysql) backends

Tobias Orlamuende t.orlamuende at webspace4you.ch
Thu Mar 22 16:07:54 UTC 2007


Hi,

I had some time to test the suggested procedure with our current setup (Debian Sarge with "2.9.17-13sarge3"-pdns-packets).
When using "launch=gmysql:first, gmysql:second" in the config-file, pdns fails at all.
When using
launch=gmysql,gmysql:second
gmysql-host=127.0.0.1
gmysql-second-host=127.0.0.1
gmysql-user=pdns
gmysql-second-user=pdns
gmysql-password=XXX
gmysql-second-password=XXX
gmysql-dbname=newdns
gmysql-second-dbname=pdns

where XXX is just anonymized, I get the following in the logs:

Mar 22 16:55:08 ns2 pdns[19182]: PowerDNS 2.9.17 (C) 2001-2005 PowerDNS.COM BV (Nov 11 2006, 11:34:36) starting up
Mar 22 16:55:08 ns2 pdns[19182]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the t
erms of the GPL version 2.
Mar 22 16:55:08 ns2 pdns[19182]: Set effective group id to 102
Mar 22 16:55:08 ns2 pdns[19182]: Set effective user id to 100
Mar 22 16:55:08 ns2 pdns[19182]: DNS Proxy launched, local port 55929, remote 127.0.0.1:53
Mar 22 16:55:08 ns2 pdns[19182]: Launched webserver on XXX:8081
Mar 22 16:55:08 ns2 pdns[19182]: Creating backend connection for TCP
Mar 22 16:55:08 ns2 pdns[19182]: gmysql Connection succesful
Mar 22 16:55:08 ns2 pdns[19182]: Caught an exception instantiating a backend, cleaning up
Mar 22 16:55:08 ns2 pdns[19182]: TCP server is unable to launch backends - will try again when questions come in: Undefined but needed argument: 'gmysqlsecond--basic-query'
Mar 22 16:55:08 ns2 pdns[19182]: About to create 3 backend threads
Mar 22 16:55:08 ns2 pdns[19182]: gmysql Connection succesful
Mar 22 16:55:08 ns2 pdns[19182]: Caught an exception instantiating a backend, cleaning up

There is something which makes me thinking of an coding error: gmysqlsecond--basic-query => should IMHO at least be gmysql-second-basic-query .
Even if setting the one or other possibility with values stated in the docs => gmysql-second-basic-query=select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s' brings no success... :-/

Could anybody help and/or give a solution for operating 2 gmysql-databases on the same server (as stated in my initial posting)?

TIA and greetings

Tobias

> -----Original Message-----
> From: bert.hubert at netherlabs.nl [mailto:bert.hubert at netherlabs.nl] 
> Sent: Montag, 11. Dezember 2006 13:34
> To: Tobias Orlamuende
> Cc: pdns-users
> Subject: Re: [Pdns-users] Some details for multiple (gmysql) backends
> 
> On Mon, Dec 11, 2006 at 01:16:37PM +0100, Tobias Orlamuende wrote:
> 
> > Since we need to implement a new provisioning-tool, we're thinking 
> > about using two backends (gmysql) with different DBs on the same 
> > server for the time of implementation and migration. The 
> new DB will 
> > be feed by the provisioning tool and should run with higher 
> priority 
> > when answering requests so that e.g. older and/or wrong 
> entries in the 
> > old DB (the currently existing one) will not be used. The 
> old DB would 
> > be freed of the entries which are available in the new one 
> from time 
> > to time and will be replaced totally by the new one on a 
> certain day.
> 
> That should "just work". Do however make sure that the 
> database that has the 'domains' table entry for a domain also 
> has the records, as that is what PowerDNS assumes!
> 
> To configure this way, use:
> launch=gmysql:first, gmysql:second
> 
> And then configure with:
> gmysql-first-dbname= and gmysql-second-dbname= etc.
> 
> I may be off a bit, check doc.powerdns.com for detauls
> 
> > Now my question(s): Is it possible to do it that way and if 
> yes, how 
> > could that priority-thing being configured?
> 
> The first configured backend gets the first shot to answer. 
> If the data isn't there, the next one will be queried.
> 
> Good luck!
> 
> -- 
> http://www.PowerDNS.com      Open source, database driven DNS 
> Software 
> http://netherlabs.nl              Open and Closed source services


More information about the Pdns-users mailing list