Re: [Pdns-users] MySQL backend and connection reuse

2018-02-05 Thread Xan Charbonnet

On 02/04/2018 11:15 PM, Xan Charbonnet wrote:

Hello,

I'm working on migrating an installation from PowerDNS 3.1 on Debian 7
"Wheezy" to PowerDNS 4.0.3 on Debian 9 "Stretch".

I'm using the MySQL backend, connected to MariaDB 10.1.30, which is not
the Stretch default, but the one from the MariaDB repository.  I've
tried the Stretch default PowerDNS 4.0.3, as well as PowerDNS 4.0.5 and
PowerDNS 4.1.0 from the PowerDNS repository, and had the same problem.

I think fundamentally the problem I'm having boils down to this: the
first time PowerDNS makes a basic-query, everything is fine.  Subsequent
times, the response is somehow truncated, and/or a previously-seen SOA
is returned.

It looks like the issue is between MariaDB and PowerDNS.  I set up socat
as a logging proxy and observed that the first time I trigger a PowerDNS
basic-query via dig, the exchanged traffic is ~10K.  The second time,
it's ~4K.

If I kill the connection between PowerDNS and MariaDB, either by
restarting MariaDB or simply by ordering MariaDB to kill the connection
in use by PowerDNS, then the subsequent attempt fails because of the
missing connection, but from then it's the same as the beginning: the
next query after that will succeed and subsequent ones will fail.

  From the MariaDB command line I can make the exact queries that
PowerDNS is making, verified by the MariaDB query log.  No problems
there: no matter how many times I do that, I always get the full results.

I should mention that all my queries are stored procedures, in case that
matters.  This all has worked perfectly on 3.1.

Any tips on what I should try next?  Thanks!



I believe this is the same issue resolved by this patch:
https://github.com/PowerDNS/pdns/pull/6134/commits/4fd90e75d47d6ec43d10c94ea260b08e50806442

I'll be porting that to Debian's 4.0.3 and recompiling.  I'll update 
here if it doesn't work, but I expect it will.

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


[Pdns-users] Getting deviceId & additional EDNS values into protobuf in recursor

2018-02-05 Thread Mangesh Bhamre
Hello PowerDNS team,

Thanks for great product!

I wish to store DNS queries to DB for reporting. Using protobufServer
settings, I am able to get protobuf message. However, I wish to add
deviceId (or additional EDNS values).

I am adding device macaddr & cpe-id using dnsmasq. I am able to get these
values in preresolve lua script as shown below.

 local macaddr=dq:getEDNSOption(65073)
 local cpeid=dq:getEDNSOption(65074)

I am having a problem with getting these EDNS values to protobuf message.
Either I should be able to update deviceID in preresolve (which I am not )
or add EDNS values in some way.

I also tried addPolicyTags API, however, that does not forward the values.

Any help here will be greatly appreciated.

Using: PowerDNS 4.1.1 on Ubuntu. Logstash as protobuf receiver.

Regards,
Mangesh
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users