PDNS 3.x with PDNS 2.9.x Database Schema

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

PDNS 3.x with PDNS 2.9.x Database Schema

Gabriel Marais
Hi Guys

Seems like I have hit a brick wall. I have PowerDNS 2.9.x running as
master and 2 slaves. I am busy moving over to Ubuntu 14.x on newly
installed servers and as such I ended up with PowerDNS 3.x which is not
compatible with the older 2.9 schema on MySQL.

I have read in a thread that one could use custom queries to overcome
the immediate issue of moving a complete DNS implementation over to the
version 3.x schema but I cannot seem to find the custom queries to
overcome the issue from my log :-

Jul 22 01:17:46 hubble pdns[2006]: Backend error: Failed to execute
mysql_query, perhaps connection died? Err=1: Unknown column 'auth' in
'field list'

Ultimately, I would like to move over to PowerDNS 3.x but right now I
need to get another 'slave' working which is sitting on PowerDNS 3.x to
work with my 2.9 master and database schema.

Can anyone perhaps point me in the right direction with the custom
queries to accommodate the missing "auth" column in the new DB schema?


Many Thanks, Gabriel

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Jan-Piet Mens-3
> I need to get another 'slave' working which is sitting on PowerDNS
> 3.x to work with my 2.9 master and database schema.

Upgrade the database schema of your 3.x slave; PowerDNS will do the
right thing when it transfers zones into that slave from your
(unmodified) 2.9 master server.

        -JP

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Jan-Piet Mens-3
(no need to take this off-list)

> the only problem is that I am doing MySQL master/slave database
> replication. upgrading the schema on the slave(s) will break the
> replication process unfortunately.

You spoke of PowerDNS master and slaves from which I gathered AXFR.

        -JP

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Leen Besselink
On Wed, Jul 22, 2015 at 02:10:34PM +0200, Jan-Piet Mens wrote:

> (no need to take this off-list)
>
> > the only problem is that I am doing MySQL master/slave database
> > replication. upgrading the schema on the slave(s) will break the
> > replication process unfortunately.
>
> You spoke of PowerDNS master and slaves from which I gathered AXFR.
>
>         -JP
>

If I remmeber correctly you should be able to upgrade the database schema of all PowerDNS servers without any problems:

"Q: Can 2.9.x versions read the 3.0 DNSSEC database schema?

A: Yes, every database can be altered to the new schema without impact on 2.9. The new fields and tables are ignored."

https://doc.powerdns.com/md/authoritative/upgrading/#database-schema

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Mark Moseley
In reply to this post by Gabriel Marais
On Tue, Jul 21, 2015 at 5:00 PM, Gabriel Marais <[hidden email]> wrote:
Hi Guys

Seems like I have hit a brick wall. I have PowerDNS 2.9.x running as master and 2 slaves. I am busy moving over to Ubuntu 14.x on newly installed servers and as such I ended up with PowerDNS 3.x which is not compatible with the older 2.9 schema on MySQL.

I have read in a thread that one could use custom queries to overcome the immediate issue of moving a complete DNS implementation over to the version 3.x schema but I cannot seem to find the custom queries to overcome the issue from my log :-

Jul 22 01:17:46 hubble pdns[2006]: Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'auth' in 'field list'

Ultimately, I would like to move over to PowerDNS 3.x but right now I need to get another 'slave' working which is sitting on PowerDNS 3.x to work with my 2.9 master and database schema.

Can anyone perhaps point me in the right direction with the custom queries to accommodate the missing "auth" column in the new DB schema?


I limped by for a little while with these queries, in the middle of a 2.9.x->3.x upgrade. It's been long enough now that I couldn't tell you what negative side effects it had, but I do remember that AXFR's did *NOT* work with the below queries. IIRC with this setup, AXFRs will actually cause a restart of pdns, so you'd want to get off of it pretty quick.

# Use old queries till we get schema updated
gmysql-basic-query=SELECT content,ttl,prio,type,domain_id,name FROM records WHERE type='%s' and name='%s'
gmysql-any-id-query=SELECT content,ttl,prio,type,domain_id,name FROM records WHERE name='%s' and domain_id=%d
gmysql-list-query=SELECT content,ttl,prio,type,domain_id,name FROM records WHERE 0=%d and domain_id='%d' order by name, type 


At the same time, the 2.9.x boxes might work just fine (but you'd obviously want to test first) with the 3.x schema, though I'm assuming you're doing mysql replication.

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Gabriel Marais


On 2015/07/22 06:48 PM, Mark Moseley wrote:

> On Tue, Jul 21, 2015 at 5:00 PM, Gabriel Marais
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Guys
>
>     Seems like I have hit a brick wall. I have PowerDNS 2.9.x running as
>     master and 2 slaves. I am busy moving over to Ubuntu 14.x on newly
>     installed servers and as such I ended up with PowerDNS 3.x which is
>     not compatible with the older 2.9 schema on MySQL.
>
>     I have read in a thread that one could use custom queries to
>     overcome the immediate issue of moving a complete DNS implementation
>     over to the version 3.x schema but I cannot seem to find the custom
>     queries to overcome the issue from my log :-
>
>     Jul 22 01:17:46 hubble pdns[2006]: Backend error: Failed to execute
>     mysql_query, perhaps connection died? Err=1: Unknown column 'auth'
>     in 'field list'
>
>     Ultimately, I would like to move over to PowerDNS 3.x but right now
>     I need to get another 'slave' working which is sitting on PowerDNS
>     3.x to work with my 2.9 master and database schema.
>
>     Can anyone perhaps point me in the right direction with the custom
>     queries to accommodate the missing "auth" column in the new DB schema?
>
>
>
Hi Mark

Thanks for the reply. This is what I was looking for..
> I limped by for a little while with these queries, in the middle of a
> 2.9.x->3.x upgrade. It's been long enough now that I couldn't tell you
> what negative side effects it had, but I do remember that AXFR's did
> *NOT* work with the below queries. IIRC with this setup, AXFRs will
> actually cause a restart of pdns, so you'd want to get off of it pretty
> quick.
>
I added the queries to my config file, pdns.local.gmysql.conf
But I'm still getting the error on the "auth" field :-
Backend error: Failed to execute mysql_query, perhaps connection died?
Err=1: Unknown column 'auth' in 'field list'

> # Use old queries till we get schema updated
> gmysql-basic-query=SELECT content,ttl,prio,type,domain_id,name FROM
> records WHERE type='%s' and name='%s'
> gmysql-any-id-query=SELECT content,ttl,prio,type,domain_id,name FROM
> records WHERE name='%s' and domain_id=%d
> gmysql-list-query=SELECT content,ttl,prio,type,domain_id,name FROM
> records WHERE 0=%d and domain_id='%d' order by name, type
>
>
> At the same time, the 2.9.x boxes might work just fine (but you'd
> obviously want to test first) with the 3.x schema, though I'm assuming
> you're doing mysql replication.

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: PDNS 3.x with PDNS 2.9.x Database Schema

Mark Moseley
On 2015/07/22 06:48 PM, Mark Moseley wrote:
On Tue, Jul 21, 2015 at 5:00 PM, Gabriel Marais
<[hidden email] <mailto:[hidden email]>> wrote:

    Hi Guys

    Seems like I have hit a brick wall. I have PowerDNS 2.9.x running as
    master and 2 slaves. I am busy moving over to Ubuntu 14.x on newly
    installed servers and as such I ended up with PowerDNS 3.x which is
    not compatible with the older 2.9 schema on MySQL.

    I have read in a thread that one could use custom queries to
    overcome the immediate issue of moving a complete DNS implementation
    over to the version 3.x schema but I cannot seem to find the custom
    queries to overcome the issue from my log :-

    Jul 22 01:17:46 hubble pdns[2006]: Backend error: Failed to execute
    mysql_query, perhaps connection died? Err=1: Unknown column 'auth'
    in 'field list'

    Ultimately, I would like to move over to PowerDNS 3.x but right now
    I need to get another 'slave' working which is sitting on PowerDNS
    3.x to work with my 2.9 master and database schema.

    Can anyone perhaps point me in the right direction with the custom
    queries to accommodate the missing "auth" column in the new DB schema?



Hi Mark

Thanks for the reply. This is what I was looking for..
I limped by for a little while with these queries, in the middle of a
2.9.x->3.x upgrade. It's been long enough now that I couldn't tell you
what negative side effects it had, but I do remember that AXFR's did
*NOT* work with the below queries. IIRC with this setup, AXFRs will
actually cause a restart of pdns, so you'd want to get off of it pretty
quick.

I added the queries to my config file, pdns.local.gmysql.conf
But I'm still getting the error on the "auth" field :-
Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'auth' in 'field list'

# Use old queries till we get schema updated
gmysql-basic-query=SELECT content,ttl,prio,type,domain_id,name FROM
records WHERE type='%s' and name='%s'
gmysql-any-id-query=SELECT content,ttl,prio,type,domain_id,name FROM
records WHERE name='%s' and domain_id=%d
gmysql-list-query=SELECT content,ttl,prio,type,domain_id,name FROM
records WHERE 0=%d and domain_id='%d' order by name, type


At the same time, the 2.9.x boxes might work just fine (but you'd
obviously want to test first) with the 3.x schema, though I'm assuming
you're doing mysql replication.



Must be a different query. You could tcpdump the query and match it up to the list of queries in the pdns docs and adapt it accordingly perhaps. 


_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Pipebacknd and "Should not get here"

Dan Campbell
I'm in the process of upgrading some PowerDNS Authoritative servers from  2.9.22 to 3.4.5, and I use the pipebackend.
 
I've noticed that when DNS queries comes in for a non-existent name in my domain, I get records like the following in /var/log/messages:
 
Jul 28 16:31:18 esd05ns01d pdns[13964]: Should not get here (hosta.mydomain.com|1): please run pdnssec rectify-zone mydomain.com

I've been searching for a way to prevent these messages, but only find information related tot he gmysql backend.
 
Is there a way to address this with the pipebackend?
--
Dan Campbell
 
 

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users