atkac's 9.5.0-22.b1 rpm doesn't have DLZ capability
Todd Lyons <[email protected]>
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Organization | Ivenue.com |
| Message-ID | <[email protected]> |
Somebody please look this over and tell me if I:
1. Did something wrong in the rpm build somehow? (don't think so)
2. Configured something wrong in DLZ config?
3. Have stumbled on a bug?
4. Am trying to use it in a way that wasn't designed?
Any ideas or suggestions would be appreciated. I'm headed out for the
day, but will hopefully see some suggestions in the morning. TIA!
I downloaded the latest srpm by atkac, built it on a 64 bit CentOS 5.1
box, and it has all but one of the SDB modules working (of course not
the one I want, which is DLZ :-). According to the changelogs, DLZ is
rolled into the SDB patchset, so I expected it to work. The logs show
what is available:
Feb 13 14:17:24 dns52 named-sdb[9645]: starting BIND 9.5.0b1 -u named -t /var/named/chroot -f
Feb 13 14:17:24 dns52 named-sdb[9645]: found 1 CPU, using 1 worker thread
Feb 13 14:17:24 dns52 named-sdb[9645]: SDB ldap zone database module loaded.
Feb 13 14:17:24 dns52 named-sdb[9645]: SDB postgreSQL DB zone database module loaded.
Feb 13 14:17:24 dns52 named-sdb[9645]: SDB sqlite3 DB zone database module loaded.
Feb 13 14:17:24 dns52 named-sdb[9645]: SDB directory DB zone database module loaded.
Feb 13 14:17:24 dns52 named-sdb[9645]: loading configuration from '/etc/named.conf'
Feb 13 14:17:24 dns52 named-sdb[9645]: listening on IPv4 interface lo, 127.0.0.1#53
<snip>
DLZ is not listed, nor is SDB-mysql (which may be the same thing, but in
my reading, I didn't think they were the same). Neither is there any
reference to the dlz configuration and it's (in)ability to connect to
the mysql db running on localhost. There is absolutely no connection
attempt to any mysql database I configure. Also, nothing gets logged in
the mysql query log (it is turned on).
My named.conf includes /etc/named.dlz, which contains this:
dlz "Mysql zone" {
database "mysql
{host=localhost user=dns dbname=dns ssl=false}
{SELECT name AS zone FROM domain WHERE name = '%zone%'}
{SELECT '86400' AS ttl,
domain_record_type.type,domain_record.name AS host,
case when lower(domain_record_type.type) = 'mx' then domain_record.value end AS mx_priority,
case when lower(domain_record_type.type) != 'mx' then domain_record.value end AS data,
'ns1.ivenue.com' AS primary_ns,
'hostmaster.ivenue.com' AS resp_person,
'2008021300' AS serial, 36000 AS refresh, 1800 AS retry, 3600000 AS expire, 86400 AS minimum
FROM domain_record,domain,domain_record_type
WHERE domain.name='%zone%' AND domain_record_type.id=domain_record.type_id AND domain_record.name='%record%'}";
};
Here's what was installed:
# rpm -qa | egrep ^bind
bind-libs-9.5.0-22.b1
bind-chroot-9.5.0-22.b1
bind-utils-9.5.0-22.b1
bind-sdb-9.5.0-22.b1
bind-9.5.0-22.b1
I rebuilt the srpm again, bumping the RELEASEVER and adding a
%define DLZ 1 just to see if maybe it wasn't picking up that setting,
but the build is the exact same. I installed the resulting binaries
anyway and they performed identically, as expected. It only shows the 4
SDB lines above in the logs, and doesn't complain about the dlz config
option in the named.dlz that's included from the named.conf. As an
aside, Graeme said in a past email that if you use the dlz keyword but
don't have dlz capability, it would bomb out, however, I can completely
remove the bind-sdb package and it will not complain about the dlz
directive. I _know_ it's reading the file, because if I rename it to
something else, only then will bind not start because it can no longer
find the file.
I can post the rpmbuild log somewhere if that would help. Everything
looks normal to me though.
The above query does work, as illustrated by searches for:
1. SELECT ... WHERE domain.name='mrball.net' AND domain_record.name='mail':
*************************** 1. row ***************************
ttl: 86400
type: A
host: mail
mx_priority: NULL
data: 22.22.22.22
primary_ns: ns1.ivenue.com
resp_person: hostmaster.ivenue.com
serial: 2008021300
refresh: 36000
retry: 1800
expire: 3600000
minimum: 86400
*************************** 2. row ***************************
ttl: 86400
type: MX
host: mail
mx_priority: 10
data: NULL
primary_ns: ns1.ivenue.com
resp_person: hostmaster.ivenue.com
serial: 2008021300
refresh: 36000
retry: 1800
expire: 3600000
minimum: 86400
2 rows in set (0.00 sec)
2. SELECT ... WHERE domain.name='mrball.net' AND domain_record.name='www':
*************************** 1. row ***************************
ttl: 86400
type: A
host: www
mx_priority: NULL
data: 22.22.22.22
primary_ns: ns1.ivenue.com
resp_person: hostmaster.ivenue.com
serial: 2008021300
refresh: 36000
retry: 1800
expire: 3600000
minimum: 86400
1 row in set (0.00 sec)
So the data is in the database and the query pulls it out in what seems
to be the correct sequence and type. With that complex of a query, I'm
not sure what kind of performance I'll end up achieving though. These
are on some pretty beefy machines so I have high hope for it. Our
current dns servers do about 40000 zones and I only see about 40 qps, so
I'm not terribly concerned.
--
Regards... Todd
There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order. --Ed Howdershelt
Linux kernel 2.6.22-14-generic 14 users, load average: 0.01, 0.03, 0.00
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/