As reported in the mailing-list for bind-dlz, the mysql-dlz-driver is unable to reconnect a lost connection if compiled with v5.x of the mysql-client. It suggested to compile with a 4.x version of the client to connect to a mysql-5.x server. But if the mysql-server is on the same machine as bind, this would be difficult :o)
There was a patch posted in the mailing-list. Can anybody test this patch, as I'm not in to ebuilds. Thank you!
Steps to Reproduce:
1. Configure bind with dlz an configure it properly to connect to a mysql-server
2. close the open bind-mysql-connection at the mysql-server
3. try to query the bind-server for a record
Bind tries to query but does not set up a new connection. So the query fails. If named is set up to answer queries it is not responsible for, it tries to ask the other official server and returns that result but stores it in the cache abd therefore thinks, it is not responsible for that domain.
A restart for named solves the problem until the connection get's closed/timedout again.
The dlz-mysql-driver should reconnect to the mysql-server as it does with version 4.x of mysql-client.
This is fixed in 9.4.2.
See http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-reconnect/ for reference.
Folks over on the bind-dlz-testers mailing list advice against using the MySQL 5 client libraries, and instead use the MySQL 4 ones. I've seen our production servers randomly die today during a trial with what seems to be related to the timeouts.
I've downgraded MySQL from dev-db/mysql-5.0.54 to dev-db/mysql-4.1.22-r1, and then realized that net-dns/bind-9.5.0_p1-r1 doesn't compile against the specified version of MySQL because of the bind-dlzmysql5-reconnect.patch getting applied.
I'm attaching an updated version of the net-dns/bind-9.5.0_p1-r1 ebuild that will only apply the patch in the presence of dev-db/mysql-5 or older. I compiled the updated net-dns/bind-9.5.0_p1-r1 ebuild againt dev-db/mysql-4.1.22-r1 and its running happily. I killed the connection on the MySQL server on several occasions, and named correctly re-establishes the connection.
Apologies if something is not in order, I'm a long term Gentoo fanatic, but this is my first attempt at modifying an ebuild.
Created attachment 161314 [details]
Only apply the bind-dlzmysql5-reconnect.patch in the presence of dev-db/mysql-5
Updated to only apply the bind-dlzmysql5-reconnect.patch in the presence of dev-db/mysql-5 or higher
(In reply to comment #2)
> Apologies if something is not in order, I'm a long term Gentoo fanatic, but
> this is my first attempt at modifying an ebuild.
Looks good to me, just committet your fix to CVS. Thanks Kenneth!