Bug 9404 - Adding a zone via the dnsserver RPC interface should trigger a zone reload in the internal DNS server
Summary: Adding a zone via the dnsserver RPC interface should trigger a zone reload in...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: DNS server (show other bugs)
Version: 4.0.0rc5
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
: 9949 10032 (view as bug list)
Depends on:
Blocks: 10371
  Show dependency treegraph
 
Reported: 2012-11-16 06:44 UTC by Kai Blin
Modified: 2015-08-10 03:18 UTC (History)
10 users (show)

See Also:


Attachments
Patch to notify DNS server when zones are created or deleted through RPC (for 4.0) (9.40 KB, patch)
2014-12-11 12:09 UTC, Samuel Cabrero
no flags Details
Patch to notify DNS server when zones are created or deleted through RPC (for 4.1) (9.47 KB, patch)
2014-12-11 12:10 UTC, Samuel Cabrero
no flags Details
4.2 patch cherry-picked from master (441 bytes, patch)
2015-03-06 00:16 UTC, Andrew Bartlett
no flags Details
4.2 patch cherry-picked from master (34.74 KB, patch)
2015-03-06 00:17 UTC, Andrew Bartlett
garming: review+
abartlet: review? (metze)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Blin 2012-11-16 06:44:39 UTC
Currently adding a zone requires a Samba restart because the internal DNS loads zones on startup and is never notified of zone changes. This is inconvenient.
Comment 1 Kai Blin 2012-11-16 06:45:27 UTC
CCing Amitay as the author of the dnsserver RPC code.
Comment 2 Amitay Isaacs 2012-11-16 07:01:22 UTC
Hi Kai,

dnsserver RPC code reloads the zones when new zones are created.  Is there a way to notify internal dns server about this change? 

I wanted to set up a pipe between DNS RPC server and internal DNS server, so most of the database operations can actually be done from one place and only protocol handling (RPC vs. DNS) is done in the local code. I guess it's a long term project now that I am no longer working on samba full time. :(
Comment 3 Kai Blin 2012-11-16 07:26:24 UTC
No, there is no way to notify the internal DNS yet. This is more of a reminder bug so we can fix this for 4.1.
Comment 4 Marc Muehlfeld 2012-11-18 17:46:50 UTC
We are running s4+bind. And any change on DNS (e. g. adding a record) requires a restart of samba to bring the changes live:

# samba-tool dns add 192.168.29.2 muc.medizinische-genetik.de marc9 A
192.168.29.70 -Uadministrator
Password for [MUC\administrator]:
Record added successfully

# host -t A marc9.muc.medizinische-genetik.de.
Host marc9.muc.medizinische-genetik.de. not found: 3(NXDOMAIN)

# /etc/init.d/rc.samba4 restart
Shutting down samba4:                                      [  OK  ]
Starting samba4:                                           [  OK  ]

# host -t A marc9.muc.medizinische-genetik.de.
marc9.muc.medizinische-genetik.de has address 192.168.29.70
Comment 5 Kai Blin 2013-06-15 07:01:54 UTC
*** Bug 9949 has been marked as a duplicate of this bug. ***
Comment 6 Kai Blin 2013-06-15 07:05:18 UTC
Andrew suggested to reread the zones when we run into an NXDOMAIN error before forwarding, but before I do this, I think we need a good way to time the impact this has on requests.
Comment 7 Björn Jacke 2013-06-16 19:19:12 UTC
at least we should not reread it on any NXDOMAIN I think. Some misconfigured clients or silly software can generate LOT's of requests that result in NXDOMAIN replies. We should probably throttle the reread rate if we go this way.
Comment 8 Björn Jacke 2013-07-17 20:37:37 UTC
*** Bug 10032 has been marked as a duplicate of this bug. ***
Comment 9 Samuel Cabrero 2014-12-11 12:09:32 UTC
Created attachment 10524 [details]
Patch to notify DNS server when zones are created or deleted through RPC (for 4.0)
Comment 10 Samuel Cabrero 2014-12-11 12:10:13 UTC
Created attachment 10525 [details]
Patch to notify DNS server when zones are created or deleted through RPC (for 4.1)
Comment 11 Andrew Bartlett 2015-03-06 00:16:17 UTC
Created attachment 10821 [details]
4.2 patch cherry-picked from master
Comment 12 Andrew Bartlett 2015-03-06 00:17:48 UTC
Created attachment 10822 [details]
4.2 patch cherry-picked from master