Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180720 - net-dns/bind - dlz does not work with mysql 5.x
Summary: net-dns/bind - dlz does not work with mysql 5.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Konstantin Arkhipov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-03 12:09 UTC by Dennis Koerner
Modified: 2008-07-25 20:32 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Only apply the bind-dlzmysql5-reconnect.patch in the presence of dev-db/mysql-5 (bind-9.5.0_p1-r1.ebuild,9.01 KB, text/plain)
2008-07-24 22:20 UTC, Kenneth Kalmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Koerner 2007-06-03 12:09:18 UTC
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!

http://sourceforge.net/mailarchive/forum.php?thread_name=20070112092418.GA50182%40bar.gandi.net&forum_name=bind-dlz-testers

Reproducible: Always

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

Actual Results:  
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.

Expected Results:  
The dlz-mysql-driver should reconnect to the mysql-server as it does with version 4.x of mysql-client.
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2008-05-03 19:27:14 UTC
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.
Comment 2 Kenneth Kalmer 2008-07-24 22:19:20 UTC
Hi guys

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.
Comment 3 Kenneth Kalmer 2008-07-24 22:20:55 UTC
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
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2008-07-25 20:32:51 UTC
(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!