Bug 12931 - samba4 bind dlz module stops working on rndc reload
Summary: samba4 bind dlz module stops working on rndc reload
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DNS plugin (BIND DLZ) (show other bugs)
Version: 4.7.6
Hardware: x64 Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Amitay Isaacs
QA Contact: Samba QA Contact
URL: https://forge.univention.org/bugzilla...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-24 10:29 UTC by Stéphane BERTHELOT
Modified: 2020-09-12 00:11 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane BERTHELOT 2017-07-24 10:29:25 UTC
I am encountering the exact same problem as described in this bug report.
A patch seems available and should fix the problem.

https://forge.univention.org/bugzilla/show_bug.cgi?id=39139

When reloading bind while I have samba setup as a PDC and using BIND9_DLZ module, the zone is deleted.
Restarting named makes it work again but is not usable since many scripts (logrotate) use reload by default.

Issuing a simple "rndc zonestatus ad.zone" just after restart is OK, and after reload I get a "rndc: 'zonestatus' failed: not found
no matching zone 'ad.zone' in any view"

This may cause a lot of trouble for dynamic updates on somewhat complex setups with Samba as a PDC (samba internal DNS server is really limited...)


I have reported the bug on Ubuntu first ( https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1670450 ), you may find more information there but the patch in univention bugtracker seems to correct the problem even on latest samba versions (4.6.x)
Comment 1 Stéphane BERTHELOT 2017-10-03 08:04:05 UTC
Sorry to bump this bug report but I don't think it has been fixed in 4.7.0. Any news ?
Comment 2 Stéphane BERTHELOT 2018-07-11 15:25:21 UTC
Bug still present as of Samba 4.7.x (on Ubuntu 18.04 LTS)
Comment 3 Andrew Bartlett 2019-07-25 03:44:28 UTC
We have been unable to reproduce this issue.  If it still happens on current Samba and current BIND9 we would very much like detailed debug information and steps to reproduce.
Comment 4 Louis 2019-08-07 13:57:58 UTC
Hai Andres, i tried that also to see if it still exist, it looks solved. 
But i cant verify it, since all my servers are on latest versions atm. 

If the problem exist in older versions on Debian/Ubuntu, the workaround ( with systemd ) is:

systemctl edit bind9.service

and add: 
[Service]
ExecReload=

( results in file : /etc/systemd/system/bind9.service.d/override.conf ) 

And i suggest change samba-ad-dc.service also a bit so it loads after bind9
systemctl edit samba-ad-dc.service
and add: 

[Unit]
After=network.target network-online.target bind9.service

(results in file: /etc/systemd/system/samba-ad-dc.service.d/override.conf ) 

systemctl restart bind9 samba-ad-dc
And you never see this problem again.