Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 105593 - bind-chroot is missing essential zone files
Summary: bind-chroot is missing essential zone files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: caching-nameserver
Version: rawhide
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: CambridgeBlocker
TreeView+ depends on / blocked
 
Reported: 2003-09-25 21:25 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-22 13:32:41 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:568 normal SHIPPED_LIVE Updated caching-nameserver package 2004-12-21 05:00:00 UTC

Description Alexandre Oliva 2003-09-25 21:25:53 UTC
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 20:19:34 UTC
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 15:21:03 UTC
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 06:14:14 UTC
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 20:40:53 UTC
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 04:29:44 UTC
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 17:45:34 UTC
*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 13:32:41 UTC
Fixed caching-nameserver-7.2-10

Comment 8 Alexandre Oliva 2003-10-25 19:47:28 UTC
Confirmed, thanks.

Comment 9 Theodore C. Belding 2004-01-12 03:41:22 UTC
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-18 02:05:57 UTC
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 19:52:11 UTC
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.