Bug 1277820 - bind doesn't start to due wrong systemd startup script
Summary: bind doesn't start to due wrong systemd startup script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 23
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Tomáš Hozza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 07:08 UTC by Gerhard Wiesinger
Modified: 2015-11-08 06:50 UTC (History)
3 users (show)

Fixed In Version: bind-9.10.3-2.fc23
Clone Of:
: 1278082 (view as bug list)
Environment:
Last Closed: 2015-11-08 06:50:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gerhard Wiesinger 2015-11-04 07:08:20 UTC
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 09:46:51 UTC
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 10:18:12 UTC
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 10:47:25 UTC
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 16:26:18 UTC
(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 16:09:42 UTC
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-06 02:34:11 UTC
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 06:50:35 UTC
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.