gmysql is using wrong domain_id

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

gmysql is using wrong domain_id

Laszlo Toth
Hi,

I have a strange problem:
I have 2 pdns servers using the same MySQL database. One is working fine
but the other is returning no results. SQL traffic analysis via tcpdump
showed the reason for having no results is because pdns is using wrong
domain IDs.

domains table:
+----+-----------------+
| id | name            |
+----+-----------------+
|  1 | foo.local       |
|  2 | 10.in.addr.arpa |
+----+-----------------+

records table:
+------+-----------+-------------------------+------+------------------------+
| id   | domain_id | name                    | type | content            
     |
+------+-----------+-------------------------+------+------------------------+
|    1 |         1 | dnstest.site.foo.local  | A    | 10.6.0.16          
     |
|    2 |         2 | 16.0.6.10.in-addr.arpa  | PTR  |
dnstest.site.foo.local |
+------+-----------+-------------------------+------+------------------------+

When I query for the A record it is using domain_id = 2, when I query
the PTR it is using domain_id = 1 to query the database for the record
in question.

Relevant config section is:
launch=gmysql,bind
bind-config=/etc/pdns/bind-backend/named.conf
bind-check-interval=10
gmysql-host=mysqlhost
gmysql-user=mysqluser
gmysql-dbname=pdns
gmysql-password=dbpass
allow-axfr-ips=127.0.0.0/8,::1, otherdns
local-port=54
master=yes

Bind backend is working fine.
I'm using Pdns 3.4.8 from epel on CentOS7.

What can cause this issue and what I need to do to fix this?

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

Re: gmysql is using wrong domain_id

Thiago Farina


On Fri, Feb 26, 2016 at 3:03 PM, Laszlo Toth <[hidden email]> wrote:
Hi,

I have a strange problem:
I have 2 pdns servers using the same MySQL database. One is working fine but the other is returning no results. SQL traffic analysis via tcpdump showed the reason for having no results is because pdns is using wrong domain IDs.

domains table:
+----+-----------------+
| id | name            |
+----+-----------------+
|  1 | foo.local       |
|  2 | 10.in.addr.arpa |
+----+-----------------+

records table:
+------+-----------+-------------------------+------+------------------------+
| id   | domain_id | name                    | type | content                |
+------+-----------+-------------------------+------+------------------------+
|    1 |         1 | dnstest.site.foo.local  | A    | 10.6.0.16              |
|    2 |         2 | 16.0.6.10.in-addr.arpa  | PTR  | dnstest.site.foo.local |
+------+-----------+-------------------------+------+------------------------+

When I query for the A record it is using domain_id = 2, when I query the PTR it is using domain_id = 1 to query the database for the record in question.

Is it possible to show us this behavior through 'dig' command?

If there is a bug, maybe it is better to file a bug in https://github.com/PowerDNS/pdns/issues/new,
with reproducible steps.

--
Thiago Farina

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