Bug 131021
| Summary: | caching-nameserver creates broken links and lots of .rpmsave files on upgrade | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alexandre Oliva <oliva> |
| Component: | caching-nameserver | Assignee: | Jason Vas Dias <jvdias> |
| Status: | CLOSED ERRATA | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | bind-9.2.4rc7-10 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-09-05 05:59:21 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 123268 | ||
|
Description
Alexandre Oliva
2004-08-26 18:01:46 UTC
Let's take this step by step:
1. After a CLEAN install of bind-9.2.4rc7-9 :
$ ls -lR /etc/named* /etc/rndc* /var/named
-rw-r--r-- 1 root root 230 Aug 25 17:38 /etc/named.conf
-rw-r----- 1 root named 1115 Aug 25 17:32 /etc/rndc.conf
-rw-r----- 1 root named 132 Aug 25 17:36 /etc/rndc.key
/var/named:
total 2
drwxrwx--- 2 named named 1024 Aug 25 17:32 data
drwxrwx--- 2 named named 1024 Aug 25 17:32 slaves
/var/named/data:
total 0
/var/named/slaves:
total 0
$ cat /etc/named.conf
// Default named.conf generated by install of bind-9.2.4rc7-9
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};
include "/etc/rndc.key";
Now bind installs the bare minimum named.conf required in order
for bind to run, instead of a non-existent or empty named.conf,
which would disable named.
2. Then install bind-chroot (as would happen during clean install
of all bind packages:
$ rpm -ivh bind-chroot-9.2.4rc7-9.i386.rpm
Preparing...
########################################### [100%]
1:bind-chroot
########################################### [100%]
[ root@jvdsibm:/home/boston/jvdias/src/rpms/bind/i386 16:19:05 1049:53 ]
$ ls -lR /etc/named* /etc/rndc* /var/named
lrwxrwxrwx 1 root root 32 Aug 26 16:19 /etc/named.conf ->
/var/named/chroot/etc/named.conf
-rw-r----- 1 root named 1115 Aug 25 17:32 /etc/rndc.conf
lrwxrwxrwx 1 root root 30 Aug 26 16:19 /etc/rndc.key ->
/var/named/chroot/etc/rndc.key
/var/named:
total 3
drwxrwx--- 5 root named 1024 Aug 26 16:19 chroot
drwxrwx--- 2 named named 1024 Aug 25 17:32 data
drwxrwx--- 2 named named 1024 Aug 25 17:32 slaves
/var/named/chroot:
total 3
drwxrwxr-- 2 root named 1024 Aug 26 16:19 dev
drwxrwx--- 2 root named 1024 Aug 26 16:19 etc
drwxrwx--- 5 root named 1024 Aug 26 16:19 var
/var/named/chroot/dev:
total 0
crw-r--r-- 1 root root 1, 3 Aug 26 16:19 null
crw-r--r-- 1 root root 1, 8 Aug 26 16:19 random
crw-r--r-- 1 root root 1, 5 Aug 26 16:19 zero
/var/named/chroot/etc:
total 4
-rw-r--r-- 1 root root 1267 Jul 12 20:12 localtime
-rw-r--r-- 1 root named 230 Aug 25 17:38 named.conf
-rw-r--r-- 1 root named 132 Aug 25 17:36 rndc.key
/var/named/chroot/var:
total 3
drwxr-x--- 4 named named 1024 Aug 26 16:19 named
drwxrwx--- 3 root named 1024 Aug 26 16:19 run
drwxrwx--- 2 named named 1024 Mar 13 2003 tmp
/var/named/chroot/var/named:
total 2
drwxrwx--- 2 named named 1024 Aug 25 16:51 data
drwxrwx--- 2 named named 1024 Jul 27 10:57 slaves
/var/named/chroot/var/named/data:
total 0
/var/named/chroot/var/named/slaves:
total 0
/var/named/chroot/var/run:
total 1
drwxrwx--- 2 named named 1024 Mar 13 2003 named
/var/named/chroot/var/run/named:
total 0
/var/named/chroot/var/tmp:
total 0
/var/named/data:
total 0
/var/named/slaves:
total 0
Now /etc{named.conf, rndc.key} have been moved to /var/named/chroot
etc, and are replaced by links to the new location so as not to
confuse operators.
3. Now install caching-nameserver:
$ rpm -ivh
/curly/dist/fc3/caching-nameserver/7.3-3/noarch/caching-nameserver-7.3-3.noarch.rpm
Preparing...
########################################### [100%]
1:caching-nameserver warning: /etc/named.conf saved as
/etc/named.conf.rpmorig
########################################### [100%]
[ root@jvdsibm:/home/boston/jvdias/src/rpms/caching-nameserver/noarch
16:44:17 1075:79 ]
$ ls -lR /etc/named* /etc/rndc* /var/named
lrwxrwxrwx 1 root root 32 Aug 26 16:44 /etc/named.conf ->
/var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root root 32 Aug 26 16:42 /etc/named.conf.rpmorig ->
/var/named/chroot/etc/named.conf
-rw-r----- 1 root named 1115 Aug 25 17:32 /etc/rndc.conf
lrwxrwxrwx 1 root root 30 Aug 26 16:42 /etc/rndc.key ->
/var/named/chroot/etc/rndc.key
/var/named:
total 3
drwxrwx--- 5 root named 1024 Aug 26 16:42 chroot
drwxrwx--- 2 named named 1024 Aug 25 17:32 data
lrwxrwxrwx 1 root root 44 Aug 26 16:44 localdomain.zone ->
/var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx 1 root root 42 Aug 26 16:44 localhost.zone ->
/var/named/chroot/var/named/localhost.zone
lrwxrwxrwx 1 root root 43 Aug 26 16:44 named.broadcast ->
/var/named/chroot/var/named/named.broadcast
lrwxrwxrwx 1 root root 36 Aug 26 16:44 named.ca ->
/var/named/chroot/var/named/named.ca
lrwxrwxrwx 1 root root 43 Aug 26 16:44 named.ip6.local ->
/var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx 1 root root 39 Aug 26 16:44 named.local ->
/var/named/chroot/var/named/named.local
lrwxrwxrwx 1 root root 38 Aug 26 16:44 named.zero ->
/var/named/chroot/var/named/named.zero
drwxrwx--- 2 named named 1024 Aug 25 17:32 slaves
/var/named/chroot:
total 3
drwxrwxr-- 2 root named 1024 Aug 26 16:42 dev
drwxrwx--- 2 root named 1024 Aug 26 16:44 etc
drwxrwx--- 5 root named 1024 Aug 26 16:42 var
/var/named/chroot/dev:
total 0
crw-r--r-- 1 root root 1, 3 Aug 26 16:42 null
crw-r--r-- 1 root root 1, 8 Aug 26 16:42 random
crw-r--r-- 1 root root 1, 5 Aug 26 16:42 zero
/var/named/chroot/etc:
total 6
-rw-r--r-- 1 root root 1267 Jul 12 20:12 localtime
-rw-r--r-- 1 root root 1323 Aug 25 18:16 named.conf
-rw-r--r-- 1 root named 302 Aug 26 16:41 named.conf.rpmsave
-rw-r--r-- 1 root named 132 Aug 25 17:36 rndc.key
/var/named/chroot/var:
total 3
drwxr-x--- 4 named named 1024 Aug 26 16:44 named
drwxrwx--- 3 root named 1024 Aug 26 16:42 run
drwxrwx--- 2 named named 1024 Mar 13 2003 tmp
/var/named/chroot/var/named:
total 11
drwxrwx--- 2 named named 1024 Aug 25 16:51 data
-rw-r--r-- 1 named named 198 Aug 25 18:16 localdomain.zone
-rw-r--r-- 1 named named 195 Aug 25 18:16 localhost.zone
-rw-r--r-- 1 named named 415 Aug 25 18:16 named.broadcast
-rw-r--r-- 1 named named 2518 Aug 25 18:16 named.ca
-rw-r--r-- 1 named named 432 Aug 25 18:16 named.ip6.local
-rw-r--r-- 1 named named 433 Aug 25 18:16 named.local
-rw-r--r-- 1 named named 416 Aug 25 18:16 named.zero
drwxrwx--- 2 named named 1024 Jul 27 10:57 slaves
/var/named/chroot/var/named/data:
total 0
/var/named/chroot/var/named/slaves:
total 0
/var/named/chroot/var/run:
total 1
drwxrwx--- 2 named named 1024 Mar 13 2003 named
/var/named/chroot/var/run/named:
total 0
/var/named/chroot/var/tmp:
total 0
/var/named/data:
total 0
/var/named/slaves:
total 0
Now /etc/named.conf, which was a link to
/var/named/chroot/etc/named.conf, has been backed up by RPM -
NOT the .spec file scripts - to
/etc/named.conf.rpmorig , and a NEW named.conf is created in the
chroot by the .spec file scripts, which back up the old named.conf
to /var/named/chroot/etc/named.conf.rpmsave .
The new named.conf is required to replace the existing
named.conf, because the caching nameserver will function only
with the new named.conf - not any other.
There's no way of telling RPM not to back up links (that I know)
or to tell it when backing up links to back up the original (a bug!)
and there's no way (that I know) of telling RPM to use different
%file locations depending on whether another package is installed
or not - it must have one set of destination file locations, which
must be /etc/... and /var/named/... , not the chroot.
So RPM will back up whatever it finds in those locations that it is
about to replace.
It is thus up to the script to move the newly installed files from
the non-chroot locations to the chroot if the chroot is installed;
if the script is going to overwrite any files in the chroot, it
saves the original as an rpmsave file.
4. Repeat Installation of caching-nameserver
$ rpm -Uvh --force
/curly/dist/fc3/caching-nameserver/7.3-3/noarch/caching-nameserver-7.3-3.noarch.rpm
Preparing...
########################################### [100%]
1:caching-nameserver warning: /etc/named.conf saved as
/etc/named.conf.rpmsave
warning: /var/named/localdomain.zone saved as
/var/named/localdomain.zone.rpmsave
warning: /var/named/localhost.zone saved as
/var/named/localhost.zone.rpmsave
warning: /var/named/named.broadcast saved as
/var/named/named.broadcast.rpmsave
warning: /var/named/named.ca saved as /var/named/named.ca.rpmsave
warning: /var/named/named.ip6.local saved as
/var/named/named.ip6.local.rpmsave
warning: /var/named/named.local saved as /var/named/named.local.rpmsave
########################################### [100%]
warning: /var/named/named.zero saved as /var/named/named.zero.rpmsave
$ ls -lR /etc/named* /etc/rndc* /var/named
lrwxrwxrwx 1 root root 32 Aug 26 16:50 /etc/named.conf ->
/var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root root 32 Aug 26 16:42 /etc/named.conf.rpmorig ->
/var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root root 32 Aug 26 16:44 /etc/named.conf.rpmsave ->
/var/named/chroot/etc/named.conf
-rw-r----- 1 root named 1115 Aug 25 17:32 /etc/rndc.conf
lrwxrwxrwx 1 root root 30 Aug 26 16:42 /etc/rndc.key ->
/var/named/chroot/etc/rndc.key
/var/named:
total 3
drwxrwx--- 5 root named 1024 Aug 26 16:42 chroot
drwxrwx--- 2 named named 1024 Aug 25 17:32 data
lrwxrwxrwx 1 root root 44 Aug 26 16:50 localdomain.zone ->
/var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx 1 root root 44 Aug 26 16:44 localdomain.zone.rpmsave
-> /var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx 1 root root 42 Aug 26 16:50 localhost.zone ->
/var/named/chroot/var/named/localhost.zone
lrwxrwxrwx 1 root root 42 Aug 26 16:44 localhost.zone.rpmsave ->
/var/named/chroot/var/named/localhost.zone
lrwxrwxrwx 1 root root 43 Aug 26 16:50 named.broadcast ->
/var/named/chroot/var/named/named.broadcast
lrwxrwxrwx 1 root root 43 Aug 26 16:44 named.broadcast.rpmsave ->
/var/named/chroot/var/named/named.broadcast
lrwxrwxrwx 1 root root 36 Aug 26 16:50 named.ca ->
/var/named/chroot/var/named/named.ca
lrwxrwxrwx 1 root root 36 Aug 26 16:44 named.ca.rpmsave ->
/var/named/chroot/var/named/named.ca
lrwxrwxrwx 1 root root 43 Aug 26 16:50 named.ip6.local ->
/var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx 1 root root 43 Aug 26 16:44 named.ip6.local.rpmsave ->
/var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx 1 root root 39 Aug 26 16:50 named.local ->
/var/named/chroot/var/named/named.local
lrwxrwxrwx 1 root root 39 Aug 26 16:44 named.local.rpmsave ->
/var/named/chroot/var/named/named.local
lrwxrwxrwx 1 root root 38 Aug 26 16:50 named.zero ->
/var/named/chroot/var/named/named.zero
lrwxrwxrwx 1 root root 38 Aug 26 16:44 named.zero.rpmsave ->
/var/named/chroot/var/named/named.zero
drwxrwx--- 2 named named 1024 Aug 25 17:32 slaves
/var/named/chroot:
total 3
drwxrwxr-- 2 root named 1024 Aug 26 16:42 dev
drwxrwx--- 2 root named 1024 Aug 26 16:50 etc
drwxrwx--- 5 root named 1024 Aug 26 16:42 var
/var/named/chroot/dev:
total 0
crw-r--r-- 1 root root 1, 3 Aug 26 16:42 null
crw-r--r-- 1 root root 1, 8 Aug 26 16:42 random
crw-r--r-- 1 root root 1, 5 Aug 26 16:42 zero
/var/named/chroot/etc:
total 7
-rw-r--r-- 1 root root 1267 Jul 12 20:12 localtime
-rw-r--r-- 1 root root 1323 Aug 25 18:16 named.conf
-rw-r--r-- 1 root root 1323 Aug 25 18:16 named.conf.rpmsave
-rw-r--r-- 1 root named 132 Aug 25 17:36 rndc.key
/var/named/chroot/var:
total 3
drwxr-x--- 4 named named 1024 Aug 26 16:50 named
drwxrwx--- 3 root named 1024 Aug 26 16:42 run
drwxrwx--- 2 named named 1024 Mar 13 2003 tmp
/var/named/chroot/var/named:
total 20
drwxrwx--- 2 named named 1024 Aug 25 16:51 data
-rw-r--r-- 1 named named 198 Aug 25 18:16 localdomain.zone
-rw-r--r-- 1 named named 198 Aug 25 18:16 localdomain.zone.rpmsave
-rw-r--r-- 1 named named 195 Aug 25 18:16 localhost.zone
-rw-r--r-- 1 named named 195 Aug 25 18:16 localhost.zone.rpmsave
-rw-r--r-- 1 named named 415 Aug 25 18:16 named.broadcast
-rw-r--r-- 1 named named 415 Aug 25 18:16 named.broadcast.rpmsave
-rw-r--r-- 1 named named 2518 Aug 25 18:16 named.ca
-rw-r--r-- 1 named named 2518 Aug 25 18:16 named.ca.rpmsave
-rw-r--r-- 1 named named 432 Aug 25 18:16 named.ip6.local
-rw-r--r-- 1 named named 432 Aug 25 18:16 named.ip6.local.rpmsave
-rw-r--r-- 1 named named 433 Aug 25 18:16 named.local
-rw-r--r-- 1 named named 433 Aug 25 18:16 named.local.rpmsave
-rw-r--r-- 1 named named 416 Aug 25 18:16 named.zero
-rw-r--r-- 1 named named 416 Aug 25 18:16 named.zero.rpmsave
drwxrwx--- 2 named named 1024 Jul 27 10:57 slaves
/var/named/chroot/var/named/data:
total 0
/var/named/chroot/var/named/slaves:
total 0
/var/named/chroot/var/run:
total 1
drwxrwx--- 2 named named 1024 Mar 13 2003 named
/var/named/chroot/var/run/named:
total 0
/var/named/chroot/var/tmp:
total 0
/var/named/data:
total 0
/var/named/slaves:
total 0
Now RPM has backed up the links (again) and the scripts have backed
up the real files (again), which they must do because the files
might have been modified between installations, and we can't stop
RPM making the backups. RPM does create more useless copies of links,
but it is still a working configuration, the links all point to the
newly installed regular files, and any old real files are backed up.
5. We can repeat the repeated installation safely:
$ rpm -Uvh --force
/curly/dist/fc3/caching-nameserver/7.3-3/noarch/caching-nameserver-7.3-3.noarch.rpm
Preparing...
########################################### [100%]
1:caching-nameserver warning: /etc/named.conf saved as
/etc/named.conf.rpmsave
warning: /var/named/localdomain.zone saved as
/var/named/localdomain.zone.rpmsave
warning: /var/named/localhost.zone saved as
/var/named/localhost.zone.rpmsave
warning: /var/named/named.broadcast saved as
/var/named/named.broadcast.rpmsave
warning: /var/named/named.ca saved as /var/named/named.ca.rpmsave
warning: /var/named/named.ip6.local saved as
/var/named/named.ip6.local.rpmsave
warning: /var/named/named.local saved as /var/named/named.local.rpmsave
########################################### [100%]
warning: /var/named/named.zero saved as /var/named/named.zero.rpmsave
[ root@jvdsibm:/home/boston/jvdias/src/rpms/caching-nameserver/noarch
16:59:14 1079:83 ]
$ ls -lR /etc/named* /etc/rndc* /var/named
lrwxrwxrwx 1 root root 32 Aug 26 16:59 /etc/named.conf ->
/var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root root 32 Aug 26 16:42 /etc/named.conf.rpmorig ->
/var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root root 32 Aug 26 16:50 /etc/named.conf.rpmsave ->
/var/named/chroot/etc/named.conf
-rw-r----- 1 root named 1115 Aug 25 17:32 /etc/rndc.conf
lrwxrwxrwx 1 root root 30 Aug 26 16:42 /etc/rndc.key ->
/var/named/chroot/etc/rndc.key
/var/named:
total 3
drwxrwx--- 5 root named 1024 Aug 26 16:42 chroot
drwxrwx--- 2 named named 1024 Aug 25 17:32 data
lrwxrwxrwx 1 root root 44 Aug 26 16:59 localdomain.zone ->
/var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx 1 root root 44 Aug 26 16:50 localdomain.zone.rpmsave
-> /var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx 1 root root 42 Aug 26 16:59 localhost.zone ->
/var/named/chroot/var/named/localhost.zone
lrwxrwxrwx 1 root root 42 Aug 26 16:50 localhost.zone.rpmsave ->
/var/named/chroot/var/named/localhost.zone
lrwxrwxrwx 1 root root 43 Aug 26 16:59 named.broadcast ->
/var/named/chroot/var/named/named.broadcast
lrwxrwxrwx 1 root root 43 Aug 26 16:50 named.broadcast.rpmsave ->
/var/named/chroot/var/named/named.broadcast
lrwxrwxrwx 1 root root 36 Aug 26 16:59 named.ca ->
/var/named/chroot/var/named/named.ca
lrwxrwxrwx 1 root root 36 Aug 26 16:50 named.ca.rpmsave ->
/var/named/chroot/var/named/named.ca
lrwxrwxrwx 1 root root 43 Aug 26 16:59 named.ip6.local ->
/var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx 1 root root 43 Aug 26 16:50 named.ip6.local.rpmsave ->
/var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx 1 root root 39 Aug 26 16:59 named.local ->
/var/named/chroot/var/named/named.local
lrwxrwxrwx 1 root root 39 Aug 26 16:50 named.local.rpmsave ->
/var/named/chroot/var/named/named.local
lrwxrwxrwx 1 root root 38 Aug 26 16:59 named.zero ->
/var/named/chroot/var/named/named.zero
lrwxrwxrwx 1 root root 38 Aug 26 16:50 named.zero.rpmsave ->
/var/named/chroot/var/named/named.zero
drwxrwx--- 2 named named 1024 Aug 25 17:32 slaves
/var/named/chroot:
total 3
drwxrwxr-- 2 root named 1024 Aug 26 16:42 dev
drwxrwx--- 2 root named 1024 Aug 26 16:59 etc
drwxrwx--- 5 root named 1024 Aug 26 16:42 var
/var/named/chroot/dev:
total 0
crw-r--r-- 1 root root 1, 3 Aug 26 16:42 null
crw-r--r-- 1 root root 1, 8 Aug 26 16:42 random
crw-r--r-- 1 root root 1, 5 Aug 26 16:42 zero
/var/named/chroot/etc:
total 7
-rw-r--r-- 1 root root 1267 Jul 12 20:12 localtime
-rw-r--r-- 1 root root 1323 Aug 25 18:16 named.conf
-rw-r--r-- 1 root root 1323 Aug 25 18:16 named.conf.rpmsave
-rw-r--r-- 1 root named 132 Aug 25 17:36 rndc.key
/var/named/chroot/var:
total 3
drwxr-x--- 4 named named 1024 Aug 26 16:59 named
drwxrwx--- 3 root named 1024 Aug 26 16:42 run
drwxrwx--- 2 named named 1024 Mar 13 2003 tmp
/var/named/chroot/var/named:
total 20
drwxrwx--- 2 named named 1024 Aug 25 16:51 data
-rw-r--r-- 1 named named 198 Aug 25 18:16 localdomain.zone
-rw-r--r-- 1 named named 198 Aug 25 18:16 localdomain.zone.rpmsave
-rw-r--r-- 1 named named 195 Aug 25 18:16 localhost.zone
-rw-r--r-- 1 named named 195 Aug 25 18:16 localhost.zone.rpmsave
-rw-r--r-- 1 named named 415 Aug 25 18:16 named.broadcast
-rw-r--r-- 1 named named 415 Aug 25 18:16 named.broadcast.rpmsave
-rw-r--r-- 1 named named 2518 Aug 25 18:16 named.ca
-rw-r--r-- 1 named named 2518 Aug 25 18:16 named.ca.rpmsave
-rw-r--r-- 1 named named 432 Aug 25 18:16 named.ip6.local
-rw-r--r-- 1 named named 432 Aug 25 18:16 named.ip6.local.rpmsave
-rw-r--r-- 1 named named 433 Aug 25 18:16 named.local
-rw-r--r-- 1 named named 433 Aug 25 18:16 named.local.rpmsave
-rw-r--r-- 1 named named 416 Aug 25 18:16 named.zero
-rw-r--r-- 1 named named 416 Aug 25 18:16 named.zero.rpmsave
drwxrwx--- 2 named named 1024 Jul 27 10:57 slaves
/var/named/chroot/var/named/data:
total 0
/var/named/chroot/var/named/slaves:
total 0
/var/named/chroot/var/run:
total 1
drwxrwx--- 2 named named 1024 Mar 13 2003 named
/var/named/chroot/var/run/named:
total 0
/var/named/chroot/var/tmp:
total 0
/var/named/data:
total 0
/var/named/slaves:
total 0
Now RPM replaces the existing backups, as do the scripts - this
can be repeated ad nauseam with the same results.
But at all times, the configuration is still working !
I don't think this is a bug.
I suppose I could make the %post script remove any .rpmsave or
.rpmorig files which are links to the chroot directory - but users
would be expected RPM to back up their existing files and the links
serve as pointers to where they have been moved.
Clean installs of the packages individually is very likely to hide the severe problem I ran into while updating all of bind* and caching-nameserver in the same transaction. Since the latter case is what one would do in practice, I strongly recommend you to try that. The problem happened on *all* of 5 boxes I had running rawhide, with yesterday's upgrade. Recipe again: 1. Install old version of bind, bind-chroot and caching-nameserver. 2. Update all of them, at the same time, to the latest versions. 3. Kaboom. I found the cause of this bug, by doing a clean install
of the older bind-9.2.3-9*, and then upgrading to bind-9.2.4rc7-9*.
Older versions of bind-chroot, eg. 9.2.3-9, listed
/var/named/chroot/etc/{named.conf,rndc.key} in their
%files list, even though they were installed as empty
files (this bug has since been fixed).
So, after the 9.2.3-9 install, we got:
-rw-r--r-- 1 root root 762 Feb 15 2004 /etc/named.conf
/var/named/chroot/etc:
total 3
-rw-r--r-- 1 root root 1267 Aug 27 17:36 localtime
-rwxr-x--- 1 root named 0 Mar 24 2003 named.conf
-rw-r----- 1 named named 132 Aug 27 17:36 rndc.key
Then I upgraded everything except the chroot and caching-nameserver
to bind-9.2.4rc7-9*; the named configuration files were then fine.
I then upgraded bind-chroot in rpm debug mode:
rpm -Uvv bind-chroot-9.2.4rc7-9.i386.rpm
The %post script completed fine, leaving all files in their
correct place, as verified by inspecting the debug log.
But AFTER the %post script of bind-chroot-9.2.4rc7-9 completes,
RPM executes the "erase" of bind-chroot-9.2.3-9, wiping out the
new bind-chroot-9.2.4rc7-9 install!
So the RPM debug log has:
D: install: %post(bind-chroot-9.2.4rc7-9) execv(/bin/sh) pid 6972
+... ( %post script of bind-chroot-9.2.4rc7-9 executes, leaving all
files installed correctly ) ...
+ :
D: install: waitpid(6972) rc 6972 status 0 secs 1.598
D: opening db index /var/lib/rpm/Triggername create mode=0x42
D: ========== --- bind-chroot-9.2.3-9 i386-linux 0x0
D: erase: bind-chroot-9.2.3-9 has 7 files, test = 0
D: read h# 1181 Header V3 DSA signature: NOKEY, key ID 30c9ecf8
D: erase: %preun(bind-chroot-9.2.3-9) asynchronous scriptlet start
D: erase: %preun(bind-chroot-9.2.3-9) execv(/bin/sh) pid 7052
+ '[' 1 = 0 ']'
D: erase: waitpid(7052) rc 7052 status 0 secs 0.012
D: fini 040770 2 ( 0, 25) 1024 /var/named/chroot/var/tmp
skip
D: fini 040770 2 ( 0, 25) 1024
/var/named/chroot/var/run/named skip
D: fini 040750 5 ( 0, 25) 1024
/var/named/chroot/var/named skip
D: fini 100640 1 ( 0, 25) 132
/var/named/chroot/etc/rndc.key backup
warning: /var/named/chroot/etc/rndc.key saved as
/var/named/chroot/etc/rndc.key.rpmsave
D: fini 100750 1 ( 0, 25) 762
/var/named/chroot/etc/named.conf
D: fini 020640 1 ( 0, 25) 0 /var/named/chroot/dev/random
D: fini 020640 1 ( 0, 25) 0 /var/named/chroot/dev/null
D: --- h# 1181 bind-chroot-9.2.3-9
D: removing "bind-chroot" from Name index.
D: removing 7 entries from Basenames index.
RPM has just deleted seven files from bind-chroot-9.2.3-9 that were
just installed by bind-chroot-9.2.4rc7-9!
After the upgrade completes, none of the seven files exist anymore,
breaking the links to them.
RPM should be deleting the files from bind-chroot-9.2.3-9
BEFORE bind-chroot-9.2.4rc7-9 replaces them, not afterwards.
After the %post script of bind-chroot-9.2.4rc7-9 completes, the
upgrade is in RPM's hands and beyond control of any script in
bind-chroot-9.2.4rc7-9 - so if RPM then deletes the files just
installed, there is nothing bind-chroot-9.2.4rc7-9 can do about it.
I will raise an RPM bug on this issue.
If the upgrade of caching-nameserver is then done AFTER the above,
it does supply a working named.conf, but rndc.key (which got deleted
by RPM during the chroot upgrade) is still missing.
This is now fixed with bind-9.2.4rc7-10 , by adding '%ghost' entries for each file included in previous bind-chroot releases that are not included in current bind-chroot release. There's still something severely broken in the current rawhide. After an `everything' install from scratch, /var/named/chroot/var/named/named.ca and others are symlinks pointing to themselves. Ditto for rawhide updates from previous installs. Ugh, nevermind. My former post-install kickstart fragment to move
files from /var/named to /var/named/chroot/var/named and create soft
links in their stead, from back when caching-nameserver didn't do
this, somehow was getting confused under the new installer environment
(SElinux?), so it ended up overwriting the files correctly installed
by the caching-nameserver in the chroot with the soft links. I can't
see anything wrong with the fragment below, though, and it worked
before. Anyhow, not a bug in caching-nameserver or bind-chroot, so
closing again. Apologies for the noise. I'm sure this is a different
problem from the one I reported earlier, since earlier problems were
not for anaconda installs, only up2date/rpm updates, and this
scriptlet wasn't involved.
NAMEDDIR=/var/named/chroot/
if test -d ${NAMEDDIR}var/named; then
for f in localhost.zone named.ca named.local; do
if test -f /var/named/$f && test ! -f ${NAMEDDIR}var/named; then
ln -f /var/named/$f ${NAMEDDIR}var/named/$f ||
cp -p /var/named/$f ${NAMEDDIR}var/named/$f
fi
done
fi
if test -d ${NAMEDDIR}etc; then
AH_IF_DIFF_COPY(/etc/localtime, ${NAMEDDIR}etc/localtime)
fi
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 |