Bug 922608 - Setting up named-chroot using setup-named-chroot not documented
Summary: Setting up named-chroot using setup-named-chroot not documented
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Documentation
Classification: Fedora
Component: system-administrator's-guide
Version: devel
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Stephen Wadeley
QA Contact: Pete Travis
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-18 04:44 UTC by Robert Harker
Modified: 2015-02-14 15:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-14 15:48:28 UTC
Embargoed:


Attachments (Terms of Use)
1st draft for discussion (37.96 KB, application/pdf)
2013-05-29 21:01 UTC, Stephen Wadeley
swadeley: review+
Details
2nd draft after feedback. (37.94 KB, application/pdf)
2013-05-30 19:38 UTC, Stephen Wadeley
swadeley: review+
Details

Description Robert Harker 2013-03-18 04:44:30 UTC
Description of problem:
In FC18 completely changed you configure the named-chroot package.

In RHEL when you install the named-chroot package, the /var/named/chroot environment gets setup automatically.

In FC18 installing named-chroot package does not set up the /var/named/chroot environment.

In FC18 you need to initialize the /var/named/chroot environment by running:
	/usr/libexec/setup-named-chroot.sh /var/named/chroot on 

I suspect this change was made with the transition to systemd.


Version-Release number of selected component (if applicable):
bind-chroot.x86_64                  32:9.9.2-8.P1.fc18

How reproducible:
www.google.com/search?q=setup-named-chroot&as_sitesearch=fedoraproject.org

Steps to Reproduce:
Search:
www.google.com/search?q=setup-named-chroot&as_sitesearch=fedoraproject.org
  
Actual results:
No results

Expected results:
Some documentation

Additional info:
Here are a set of steps I wrote about setting named-chroot in FC18:

# Steps to set up a named in a chroot environment in FC18

# Install the packages
yum install bind bind-chroot

# Enable chroot environment
# Note: This is a significant change (in FC18)/(relating to systemd)
/usr/libexec/setup-named-chroot.sh /var/named/chroot on 

# Check chroot environment
ls -l /var/named/chroot/etc /var/named/chroot/var/named

# Optional:
# You may also want to hard link named.conf and rndc.key from /var/named/chroot/etc to /etc.
# Check with
ls -li /etc/named.conf /var/named/chroot/etc/named.conf
ls -li /etc/rndc.key /var/named/chroot/etc/rndc.key
# Create hard links with (ln with no -s)
ln /var/named/chroot/etc/named.conf /etc/named.conf
ln /var/named/chroot/etc/rndc.key /etc/rndc.key

# Enable the named-chroot service
# Note: If you are running named-chroot.service you do not run named.service
# Note: This is a significant change (in FC18)/(relating to systemd)
systemctl enable named-chroot.service
systemctl start named-chroot.service
# Check with
systemctl status named-chroot.service

# For ease in named administration add yourself to group named
useradd ???

Note: FC18 still uses the rndc command to manage named.  Systemd only start/stops the named daemon

Comment 1 Robert Harker 2013-03-18 04:52:57 UTC
[bind] retire initscript in favour of systemd unit files (#719419)
http://lists.fedoraproject.org/pipermail/scm-commits/2012-January/728117.html

Comment 2 Stephen Wadeley 2013-04-04 12:30:21 UTC
Using links to Fedora 17 Sysadmin Guide for discussion purposes as Fedora 18 Sysadmin Guide is not live.

I found the following reference to bind-chroot and /var/named/chroot:
docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/index.html


and /var/named/chroot is also mentioned here:
http://docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/ch-The_sysconfig_Directory.html#s2-sysconfig-named

I will write this up for comment and feedback.

Comment 3 Robert Harker 2013-04-06 17:17:37 UTC
The section in sysconfig-named just defines what can go into the /etc/sysconfig/named file.

It then points to section 12.2 of the sys admin guide which has nothing on setting up or using a chroot environment.  The setup procedure has changed with the advent of systemd

Comment 4 Stephen Wadeley 2013-05-29 21:01:09 UTC
Created attachment 754538 [details]
1st draft for discussion

Comment 5 Tomáš Hozza 2013-05-30 12:10:37 UTC
(In reply to Robert Harker from comment #0)
> Additional info:
> Here are a set of steps I wrote about setting named-chroot in FC18:
> 
> # Steps to set up a named in a chroot environment in FC18
> 
> # Install the packages
> yum install bind bind-chroot

"yum install bind-chroot" is enough. bind-chroot Requires bind package,
so yum will cover this for you.

> # Enable chroot environment
> # Note: This is a significant change (in FC18)/(relating to systemd)
> /usr/libexec/setup-named-chroot.sh /var/named/chroot on 
> 
> # Check chroot environment
> ls -l /var/named/chroot/etc /var/named/chroot/var/named
> 
> # Optional:
> # You may also want to hard link named.conf and rndc.key from
> /var/named/chroot/etc to /etc.
> # Check with
> ls -li /etc/named.conf /var/named/chroot/etc/named.conf
> ls -li /etc/rndc.key /var/named/chroot/etc/rndc.key
> # Create hard links with (ln with no -s)
> ln /var/named/chroot/etc/named.conf /etc/named.conf
> ln /var/named/chroot/etc/rndc.key /etc/rndc.key

You don't have to do this at all! named-chroot.service will do everything
for you! To all you have to do is just run "systemctl start named-chroot"

> # Enable the named-chroot service
> # Note: If you are running named-chroot.service you do not run named.service
> # Note: This is a significant change (in FC18)/(relating to systemd)
> systemctl enable named-chroot.service
> systemctl start named-chroot.service
> # Check with
> systemctl status named-chroot.service
> 
> # For ease in named administration add yourself to group named
> useradd ???
> 
> Note: FC18 still uses the rndc command to manage named.  Systemd only
> start/stops the named daemon

systemd can also make BIND to reload it's configuration using rndc for you.
All you have to do is type "systemctl reload named-chroot"

Comment 6 Stephen Wadeley 2013-05-30 19:38:45 UTC
Created attachment 755032 [details]
2nd draft after feedback.

Thank you for the feedback, improvements have been made.

Comment 7 Tomáš Hozza 2013-05-31 06:55:18 UTC
(In reply to Stephen Wadeley from comment #6)
> Created attachment 755032 [details]
> 2nd draft after feedback.
> 
> Thank you for the feedback, improvements have been made.

Looks good. Simple as it gets... :)

Comment 8 Stephen Wadeley 2013-06-18 06:26:01 UTC
commit bb9374c86e4685aed477a7cc893263301717ab5e
Author: Stephen Wadeley <swadeley>
Date:   Mon Jun 17 23:58:13 2013 +0200

    [Bug 922608] Setting up named-chroot using setup-named-chroot

Comment 9 Pete Travis 2013-06-18 13:14:52 UTC
A very straightforward and thorough coverage; QA PASS!


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