Bug 9410 - Samba need restart when DNS entries change
Summary: Samba need restart when DNS entries change
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: DNS server (show other bugs)
Version: 4.0.0rc5
Hardware: x86 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Kai Blin
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 9365
  Show dependency treegraph
 
Reported: 2012-11-19 07:59 UTC by Marc Muehlfeld
Modified: 2012-12-04 19:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2012-11-19 07:59:38 UTC
If I add a new entry e. g. with samba-tool, I have to restart samba, before I
can query the new record:

# 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


This is expecially problematic in a single DC environment.


I' currently samba4 together with bind 9.8.4.
Comment 1 Amitay Isaacs 2012-11-26 00:08:42 UTC
If you add a new record, you don't need to restart samba. Something is definitely wrong here.  Please do the following steps and attach the BIND output. 

Replace ... with your samba4 install directory path.

1. Enable debugging for DLZ BIND9 module. In .../private/named.conf, change the following line

   database "dlopen .../bin/modules/bind9/dlz_bind9.so";

to

   database "dlopen .../bin/modules/bind9/dlz_bind9.so -d 3"


2. Run BIND manually to capture logs:

  /usr/sbin/named -u named -f -g 2>&1 | tee named.log


3. Add a new DNS record using samba-tool dns

  samba-tool dns add 192.168.29.2 muc.medizinische-genetik.de test1 A 1.2.3.4


4. Query DNS record using BIND9

   dig test1.muc.medizinische-genetik.de @192.168.29.2


5. Attach named.log to this defect.


You would need to reload BIND database if add/delete a zone. But never have to restart samba4.
Comment 2 Marc Muehlfeld 2012-11-26 08:48:55 UTC
Hello Amitay,

I tried to generate your debug logs today, but I couldn't reproduce the issue any more, and I don't understand why. I had this for days. I also searched my shell history to see if I run the right commands on the right host (add and query on the same DNS, etc.) in the past. It were the same than I run today. Only that today the queries are returning results without restarting samba.

So I think this bugreport can be closed. I'm sorry for disturbing.