Re: [Pdns-users] PowerDNS Master / Slave

2011-08-16 Thread Cristian Cappelletti
Hi all,


Il 05/08/2011 20:03, Ian Mordey ha scritto:
 I have powerdns running perfectly using a MySQL cluster to store the data. 
 The way I do it is have the pdns servers run a local copy of MySQL and 
 replicate from the cluster. This eliminates downtime if the link between the 
 geographically separate DNS servers and the master cluster is down. I don't 
 have AXFR master/slave setup anywhere as any updates are made to the cluster 
 table and this is replicated out to the local mysql instance.
 
 Cheers 
 Ian
 


I have the same implementation as described by Ian.

Now, I have to handle even the SLAVE zones, for our customers who prefer to
manage domains on their servers (AXFR master/slave setup). So I have to manage
NATIVE domains for those
customers that use our DNS tool panel and SLAVE domains for customers who have
a their own server that acts as a master.

In this scenario, the local 'records' table on two DNS servers would be written:
- by native replication from MySQL cluster for records of NATIVE zone
- by pdns daemon for records of SLAVE zone

... having as a result a misalignment of the 'records' tables on the local and
cluster MySQL instance.


Can I configure pdns to cache the AXFR records without saving them on local 
DB?

Or more generally, what is the best way to implement my scenario?


Kind regards,
Cristian

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] PowerDNS Master / Slave

2011-08-05 Thread Ian Mordey
I have powerdns running perfectly using a MySQL cluster to store the data. The 
way I do it is have the pdns servers run a local copy of MySQL and replicate 
from the cluster. This eliminates downtime if the link between the 
geographically separate DNS servers and the master cluster is down. I don't 
have AXFR master/slave setup anywhere as any updates are made to the cluster 
table and this is replicated out to the local mysql instance.

Cheers 
Ian

On 3 Aug 2011, at 15:48, Stefan Schmidt zaph...@zaphods.net wrote:

 Hi There,
 
 On Wed, Aug 3, 2011 at 4:11 PM, Support Desk support.desk@gmail.com 
 wrote:
 I am looking into deploying two powerdns Servers on my Network. I would like
 both to use a mysql cluster that I have setup as their backend. My question
 is, if both servers are letting the MySql cluster do the replication, should
 they both be configured as Masters?
 
 If the backend - in this case mysql - is doing the replication itself
 we are calling it 'Native' mode.
 You would only need to set master=yes in pdns.conf in order to enable
 your name servers sending out DNS NOTIFY messages to all servers
 mentioned as NS records for a zone that has changed recently. In Mysql
 PowerDNS will then update the last notified_serial column of the
 domains table in your database.
 slave=yes will enable PowerDNS to listen to such NOTIFIES and if the
 domain is of type 'SLAVE' it will then try to AXFR the zone and
 subsequently update all entries in the records table.
 Thus enabling either master or slave bears a slight risk that both of
 your PowerDNS servers will try to update the same column at once.
 I am not entirely sure how a MySQL cluster would handle this kind of
 deadlock. Gracefully i'd hope.
 
 Stefan
 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users
 
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] PowerDNS Master / Slave

2011-08-03 Thread Stefan Schmidt
Hi There,

On Wed, Aug 3, 2011 at 4:11 PM, Support Desk support.desk@gmail.com wrote:
 I am looking into deploying two powerdns Servers on my Network. I would like
 both to use a mysql cluster that I have setup as their backend. My question
 is, if both servers are letting the MySql cluster do the replication, should
 they both be configured as Masters?

If the backend - in this case mysql - is doing the replication itself
we are calling it 'Native' mode.
You would only need to set master=yes in pdns.conf in order to enable
your name servers sending out DNS NOTIFY messages to all servers
mentioned as NS records for a zone that has changed recently. In Mysql
PowerDNS will then update the last notified_serial column of the
domains table in your database.
slave=yes will enable PowerDNS to listen to such NOTIFIES and if the
domain is of type 'SLAVE' it will then try to AXFR the zone and
subsequently update all entries in the records table.
Thus enabling either master or slave bears a slight risk that both of
your PowerDNS servers will try to update the same column at once.
I am not entirely sure how a MySQL cluster would handle this kind of
deadlock. Gracefully i'd hope.

 Stefan
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] PowerDNS Master/Slave

2007-02-09 Thread Michael Holm

Hi..
Im trying to setup a PowerDNS server, one acting as master and the other 
one acting as slave... im running debian on both computer..


the problem is that.. when i add a domain in the database on my master 
(10.1.1.248), then i expect my slave (10.1.1.249) to get a notify about 
that.. and add it right away.. but nothing happens..
when i make a lookup on the master everything works fine.. but when i 
ask the slave.. i get no return.


i hope that someone can give me some help.. or some hints of what i 
possible can do wrong.


my configuration, database and log is below:

master config:
allow-axfr-ips=10.1.1.249
config-dir=/etc/powerdns
daemon=yes
disable-axfr=yes
guardian=yes
launch=gmysql
lazy-recursion=yes
local-address=10.1.1.248
local-port=53
master=yes
module-dir=/usr/lib/powerdns
recursor=MY ISP
setgid=pdns
setuid=pdns
socket-dir=/var/run
version-string=powerdns
include=/etc/powerdns/pdns.d

mysql select * from domains;
++--+-++++-+-+-+-+
| id | fkuserid | name| master | last_check | type   
| notified_serial | account | reverse | cdatetime   |

++--+-++++-+-+-+-+
|  1 |1 | sarge.lan   | NULL   |   NULL | NATIVE 
|NULL | NULL|   0 | 2007-02-09 14:26:33 |

++--+-++++-+-+-+-+

mysql select * from records where domain_id=3;
++---+---+--+--+---+--+-+-+--+
| id | domain_id | name  | type | 
content  | ttl   | prio | change_date | 
cdatetime   | editable |

++---+---+--+--+---+--+-+-+--+
| 11 | 1 | sarge.lan | SOA  | sarge.lan [EMAIL PROTECTED]  
2007020902 | 86400 | NULL |NULL | 2007-02-09 14:26:33 |0 |
| 12 | 1 | sarge.lan | NS   | 
ns1.example.com  | 86400 | NULL |NULL | 
2007-02-09 14:26:33 |0 |
| 13 | 1 | sarge.lan | NS   | 
ns2.example.com  | 86400 | NULL |NULL | 
2007-02-09 14:26:33 |0 |
| 14 | 1 | sarge.lan | A| 
10.1.1.248   | 86400 | NULL |NULL | 
2007-02-09 14:26:33 |1 |
| 15 | 1 | ns1.sarge.lan | A| 
10.1.1.248   | 86400 | NULL |NULL | 
2007-02-09 14:26:52 |1 |
| 16 | 1 | ns2.sarge.lan | A| 
10.1.1.249   | 86400 | NULL |NULL | 
2007-02-09 14:37:02 |1 |

++---+---+--+--+---+--+-+-+--+


and the slave:

first the configuration file:
config-dir=/etc/powerdns
daemon=yes
disable-axfr=yes
guardian=yes
launch=gmysql
lazy-recursion=yes
local-address=10.1.1.249
local-port=53
module-dir=/usr/lib/powerdns
recursor=62.199.234.11
setgid=pdns
setuid=pdns
slave=yes
socket-dir=/var/run
version-string=powerdns
include=/etc/powerdns/pdns.d


mysql select * from supermasters;
++++-+-+
| id | ip | nameserver | account | cdatetime   |
++++-+-+
|  1 | 10.1.1.248 | sarge.lan  | NULL| 2007-02-09 14:20:31 |
++++-+-+
1 row in set (0.00 sec)

[EMAIL PROTECTED]:~$ host -a sarge.lan
Trying sarge.lan
Host sarge.lan not found: 3(NXDOMAIN)
Received 102 bytes from 10.1.1.249#53 in 3 ms
[EMAIL PROTECTED]:~$ cat /etc/resolv.conf
nameserver 10.1.1.249
nameserver 10.1.1.248

[EMAIL PROTECTED]:~$ host -a sarge.lan
Trying sarge.lan
;; -HEADER- opcode: QUERY, status: NOERROR, id: 5201
;; flags: qr aa rd; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sarge.lan. IN  ANY

;; ANSWER SECTION:
sarge.lan.  86400   IN  SOA sarge.lan. 
user.sarge.lan. 2007020902 10800 3600 604800 3600

sarge.lan.  86400   IN  NS  ns2.example.com.
sarge.lan.  86400   IN  NS  ns1.example.com.
sarge.lan.  86400   IN  A   10.1.1.248

Received 140 bytes from 10.1.1.248#53 in 123 ms
[EMAIL PROTECTED]:~$ cat /etc/resolv.conf
nameserver 10.1.1.248
nameserver 10.1.1.249

--
mvh
Michael Holm

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users