Bug 9365 - New added DNS entries are not resolvable
Summary: New added DNS entries are not resolvable
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: DNS server (show other bugs)
Version: 4.0.0rc4
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Kai Blin
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on: 9410
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-07 10:24 UTC by Marc Muehlfeld
Modified: 2012-12-04 19:11 UTC (History)
0 users

See Also:


Attachments
Named Logfile (27.58 KB, application/octet-stream)
2012-11-08 09:06 UTC, Marc Muehlfeld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2012-11-07 10:24:21 UTC
I'm running rc4 + Bind 9.8.4.


If I add a DNS record via the windows DNS tool, or via samba-tool, the new added entry is not resolvable:

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


# host -t A marc.muc.medizinische-genetik.de
Host marc.muc.medizinische-genetik.de.localdomain not found: 2(SERVFAIL)



Other DNS entries that were created in the past work fine:

# host -t A vm-05.muc.medizinische-genetik.de
vm-05.muc.medizinische-genetik.de has address 10.1.0.192

# host -t SRV _ldap._tcp.muc.medizinische-genetik.de.
_ldap._tcp.muc.medizinische-genetik.de has SRV record 0 100 389 exon.muc.medizinische-genetik.de.
Comment 1 Marc Muehlfeld 2012-11-08 09:06:31 UTC
Created attachment 8166 [details]
Named Logfile

Output of
# /usr/sbin/named -u named -d 10 -f -g 2>&1 | tee named.log
Comment 2 Marc Muehlfeld 2012-11-09 13:22:52 UTC
Amitay Isaacs solved the problem on the mailing list:

Some files in private/dns/sam.ldb.d/ have to hard links to files in private/sam.ldb.d/.

Maybe through a copy of the samba-folder or a restore in the past, the hardlinking got lost and the content of the two folders differ, because it were separate files then.


Amitay Isaacs solution that fixed it for me:

  # cd dns/sam.ldb.d
  # rm DC%3DDOMAINDNSZONES,DC%3DMUC,DC%3DMEDIZINISCHE-GENETIK,DC%3DDE.ldb
  # rm DC%3DFORESTDNSZONES,DC%3DMUC,DC%3DMEDIZINISCHE-GENETIK,DC%3DDE.ldb
  # rm metadata.tdb
  # ln ../../sam.ldb.d/DC%3DDOMAINDNSZONES,DC%3DMUC,DC%3DMEDIZINISCHE-GENETIK,DC%3DDE.ldb .
  # ln ../../sam.ldb.d/DC%3DFORESTDNSZONES,DC%3DMUC,DC%3DMEDIZINISCHE-GENETIK,DC%3DDE.ldb
  # ln ../../sam.ldb.d/metadata.tdb .


Is there a special reason for hardlinking? Softlinks seem to be less dangerous when copying or moving (across filesystems)?




But one issue about adding DNS entries left:
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
Comment 3 Marc Muehlfeld 2012-11-19 08:01:18 UTC
Kai told me on the mailinglist to open a new bug report for the "can't do DNS changes without restarting samba"-problem: https://bugzilla.samba.org/show_bug.cgi?id=9410


So this bug report can be closed.
Comment 4 Matthias Dieter Wallnöfer 2012-11-19 15:04:34 UTC
Okay, so let us add a dependency.
Comment 5 Marc Muehlfeld 2012-12-04 19:11:24 UTC
I can't reproduce the issue any more (rc5 and rc6):

# 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.
marc9.muc.medizinische-genetik.de has address 192.168.29.70



Works without restaring now. So this bug report can be closed.