Bug 105593 - bind-chroot is missing essential zone files
bind-chroot is missing essential zone files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: caching-nameserver (Show other bugs)
rawhide
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks: CambridgeBlocker
  Show dependency treegraph
 
Reported: 2003-09-25 17:25 EDT by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-22 09:32:41 EDT
Type: ---
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 Alexandre Oliva 2003-09-25 17:25:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
bind and bind-chroot, as installed in a full install, are configured with
ROOTDIR=/var/named/chroot, but the etc/named.conf in there requires the presence
of zone files that do not exist in the chroot (localhost.zone, named.ca,
named.local), so named fails to start.
Comment 1 Daniel Walsh 2003-09-29 16:19:34 EDT
I believe this is caused because the chroot environment was installed before the
cacheing nameserver.  

Named does not include an /etc/named.conf file.  So if you install bind,
bind-chroot and then install cacheing nameserver the cacheing nameserver files
will not be placed in the chroot environment.  

The bug should be that cacheing nameserver needs to check if bind is chroot and
install to the chroot directory.

Dan
Comment 2 Daniel Walsh 2003-10-08 11:21:03 EDT
Converted cacheing nameserver to copy its files into the chroot directory if it
exists.

Fixed in caching-nameserver-7_2-8
Dan
Comment 3 Alexandre Oliva 2003-10-09 02:14:14 EDT
I tried removing the files from the chroot, then rpm -U
caching-namesever-7.2-8.noarch.rpm, and the files were still missing from the
chroot.
Comment 4 Alexandre Oliva 2003-10-18 16:40:53 EDT
I see that the code that should copy the conf files to $ROOTDIR is in place, but
it definitely doesn't get run.  The only piece I don't understand (being
clueless in terms of rpm building) is:

if [ $1 = 0 ];

this seems wrong for a %postinstall, that should have != 0.  = 0 would be
appropriate for post-uninstall, to clean up.
Comment 5 Daniel Walsh 2003-10-19 00:29:44 EDT
Yes I didn't fully understand this either.  After further experimentation this
indicates how many times a package has been installed.  So the first time it
would be 1 not 0.  It is only 0 on an uninstall.

Fixed in caching-nameserver-7.2-9
Comment 6 Alexandre Oliva 2003-10-19 13:45:34 EDT
*almost* there.  There's a cut&pasto here:

cp -f /var/named/named.localhost.zone $ROOTDIR/var/named

It shoudl be /var/named/localhost.zone, not /var/named/named.localhost.zone.
Comment 7 Daniel Walsh 2003-10-22 09:32:41 EDT
Fixed caching-nameserver-7.2-10
Comment 8 Alexandre Oliva 2003-10-25 15:47:28 EDT
Confirmed, thanks.
Comment 9 Theodore C. Belding 2004-01-11 22:41:22 EST
After doing a clean reinstall of bind-9.2.2.P3-9.i386.rpm,
bind-chroot-9.2.2.P3-9.i386.rpm, bind-utils-9.2.2.P3-9.i386.rpm,
redhat-config-bind-2.0.0-18.noarch.rpm, and
caching-nameserver-7.2-10.noarch.rpm on a PC running Fedora Core 1, I
find that named.conf, named.custom, and rndc.key are put in /etc, not
/var/named/chroot/etc; and localhost.zone, named.ca, and named.local
are put in /var/named, not /var/named/chroot/var/named (see below).
Maybe this bug should be reopened? Thanks!

[root@villiers root]# service named stop
Stopping named: rndc: connect failed: connection refused
                                                           [  OK  ]
[root@villiers root]# rm -rf /etc/named*
[root@villiers root]# rm -rf /var/named/
[root@villiers root]# rpm -Uvh *.rpm --force
Preparing...               
########################################### [100%]
   1:bind-utils            
########################################### [ 20%]
   2:bind                  
########################################### [ 40%]
   3:bind-chroot           
########################################### [ 60%]
   4:caching-nameserver    
########################################### [ 80%]
   5:redhat-config-bind    
########################################### [100%]
[root@villiers root]# rpm -q bind
bind-9.2.2.P3-9
[root@villiers root]# rpm -q bind-chroot
bind-chroot-9.2.2.P3-9
[root@villiers root]# rpm -q bind-utils
bind-utils-9.2.2.P3-9
[root@villiers root]# rpm -q redhat-config-bind
redhat-config-bind-2.0.0-18
[root@villiers root]# rpm -q caching-nameserver
caching-nameserver-7.2-10
[root@villiers root]# ls -l /etc/named*
-rw-r--r--    1 root     root          762 Oct 22 09:21 /etc/named.conf
-rw-r--r--    1 root     root          241 Oct 22 10:17 /etc/named.custom
[root@villiers root]# ls -l /etc/rndc.*
-rw-r-----    1 root     named        1101 Oct 17 12:02 /etc/rndc.conf
-rw-r-----    1 root     named         132 Jan  6 02:31 /etc/rndc.key
[root@villiers root]# ls -l /var/named
total 20
drwxr-xr-x    5 root     root         4096 Jan 11 22:36 chroot
-rw-r--r--    1 named    named         195 Oct 22 09:21 localhost.zone
-rw-r--r--    1 named    named        2499 Oct 22 09:21 named.ca
-rw-r--r--    1 named    named         433 Oct 22 09:21 named.local
drwxrwx---    2 named    named        4096 Oct 17 12:02 slaves
[root@villiers root]# ls -l /var/named/chroot/etc/
total 0
-rwxr-x---    1 root     named           0 Mar 24  2003 named.conf
-rw-r-----    1 root     named           0 Mar 13  2003 rndc.key
[root@villiers root]# ls -l /var/named/chroot/var/named/
total 0
[root@villiers root]#
Comment 10 Tom Weeks 2004-01-17 21:05:57 EST
I too think that thsi si still a bug.

I'm running:
# rpm -qa|grep bind
bind-9.2.2.P3-9
bind-chroot-9.2.2.P3-9
bind-utils-9.2.2.P3-9
ypbind-1.12-3
redhat-config-bind-2.0.0-18


I too was missing the essential .zone files from the /var/named/chroot/var/named/ directory.

Additionally, my /var/named/chroot/etc/named.conf was 0 bytes.  The chroot'd environment is incomplete and does not.  

Anyone else care to verify?

Tweeks

Comment 11 John Flanagan 2004-12-21 14:52:11 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-568.html

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