Bug 1277820 - bind doesn't start to due wrong systemd startup script
bind doesn't start to due wrong systemd startup script
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
23
All Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Tomáš Hozza
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-04 02:08 EST by Gerhard Wiesinger
Modified: 2015-11-08 01:50 EST (History)
3 users (show)

See Also:
Fixed In Version: bind-9.10.3-2.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1278082 (view as bug list)
Environment:
Last Closed: 2015-11-08 01:50:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gerhard Wiesinger 2015-11-04 02:08:20 EST
Description of problem:
The checking of the zone doesn't work correctly on startup

Version-Release number of selected component (if applicable):
bind-chroot-9.10.3-1.fc23.x86_64

How reproducible:
Start bind ind chroot environment

Steps to Reproduce:
1. Create config in chroot environment with a zone file

Actual results:
Doesn't start

Expected results:
To start

Additional info:
Problem is missing chroot directory for zone file checking.
nano -w /usr/lib/systemd/system/named-chroot.service
#ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi'
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -t /var/named/chroot -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi'
systemctl daemon-reload
systemctl restart named-chroot

Please fix it urgently, it is a release showstopper
Comment 1 Tomáš Hozza 2015-11-04 04:46:51 EST
When using bind-chroot package, everything is prepared in a way so that you don't have to think about the chroot directory. This means that all zone files and configuration is bind-mounted automatically (by named-chroot-setup.service) into the chroot environment. This happens ONLY if the files and directories are NOT present inside the chroot environment before the bind-mount happens.

This means that you should keep the configuration in the standard places (/etc/named.conf, /var/named/*, etc.) and then just start the named-chroot.service.

If you copy the configuration into the chroot directory, then you'll have to modify the service files yourself. I'm not going to change the service files, since everything works when used in a way I described.

For more information, please refer to the "Running BIND in a chroot environment" section of https://docs.fedoraproject.org/en-US/Fedora/22/html/Networking_Guide/sec-bind-namedconf.html
Comment 2 Gerhard Wiesinger 2015-11-04 05:18:12 EST
OK, config was from a system before the automatismus was implemented and it had to be done manually. Worked well with FC22. Moved to standard bind config. Works well now. Thnx.
Comment 3 Gerhard Wiesinger 2015-11-04 05:47:25 EST
BTW: Doesn't it look like a bug then in FC22, because that changed from FC22 to FC23
/usr/lib/systemd/system/named-chroot.service
ExecStartPre=/usr/sbin/named-checkconf -t /var/named/chroot -z /etc/named.conf
Comment 4 Tomáš Hozza 2015-11-04 11:26:18 EST
(In reply to Gerhard Wiesinger from comment #3)
> BTW: Doesn't it look like a bug then in FC22, because that changed from FC22
> to FC23
> /usr/lib/systemd/system/named-chroot.service
> ExecStartPre=/usr/sbin/named-checkconf -t /var/named/chroot -z
> /etc/named.conf

Good catch. Will fix it soon...
Comment 5 Fedora Update System 2015-11-05 11:09:42 EST
bind-9.10.3-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-aad2c8ec85
Comment 6 Fedora Update System 2015-11-05 21:34:11 EST
bind-9.10.3-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update bind'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-aad2c8ec85
Comment 7 Fedora Update System 2015-11-08 01:50:35 EST
bind-9.10.3-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.