[PATCH] s4-dns: dlz-bind9: Continue lookup if error on multivalued record types

Stefan (metze) Metzmacher metze at samba.org
Thu Jul 31 04:13:01 MDT 2014


Am 31.07.2014 um 08:55 schrieb Amitay Isaacs:
> On Thu, Jul 31, 2014 at 12:09 AM, Samuel Cabrero <scabrero at zentyal.com>
> wrote:
> 
>> Hi Amitay,
>>
>> I have made the test work, but I found another issue. The internal DNS
>> server caches the zones when the task start so if a new zone is added it is
>> not aware of it until samba restarts. All queries for that zone are
>> forwarded or fail with NXDOMAIN.
>>
>> I see two options here:
>> 1. Do not cache the zones and behave like the bind dlz, querying the
>> database in each DNS query.
>> 2. Implement IRPC handlers in dns server for zone created/deleted, and
>> call them whenever a zone is created or deleted through RPC to reload
>> cached zones.
>>
>> Which one do you think is better?
> 
> 
> You have hit the nail on the head. :-)  Kai and I have discussed the issue
> of duplication of code in rpc dnsserver and dns server.  Any sort of merge
> would also require communication between rpc dnsserver and dns server.
> However, neither of us had time to actually implement it.  The issue of not
> being able to reload zones without restarting samba has been raised few
> times.  So if we can implement that, then it would be much better.
> 
> The issue is not only when the zones are added/deleted, but also when the
> records are updated, the serial changes and that would need to be reflected
> in dns server.

I think having a dns_db_enumerate_zones() function is good,
but I think we could still cache the result, for some time

[MS-DNSP] has a DsPollingInterval, which is 3 minutes by default.

We could use dsdb_load_partition_usn() to find out if something changed,
We could then have that info cached per partition.

We also need to use ldb_get_root_basedn() instead of
ldb_get_default_basedn()
for the ForestDnsZones.

BTW: I started to implement the dNSTombstoned feature and unified some of
the low level functions of the internal dns server and the bind dlz module.
See
https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-dns
for the work in progress.

I could make use of a dns_db_enumerate_zones() function in the cleanup
task too.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140731/4be02047/attachment.pgp>


More information about the samba-technical mailing list