Your message dated Sun, 14 Sep 2008 21:02:12 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#478593: fixed in pdns-recursor 3.1.7-2
has caused the Debian Bug report #478593,
regarding pdns-recursor init script errors make stop action kill instances with
different pid files
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
478593: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478593
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: pdns-recursor
Version: 3.1.4-1
Hi,
As the title says... if you change socket-dir in the configuration file, the
init script and rec_control by default don't see it - they insist on using
the hardcoded /var/run.
That is annoying in the (hopefully common) case where one uses chroot() -
you have to put the control socket somewhere inside the chroot directory,
and it would be a bit silly to chroot into /var/run (there are other
programs' files in there).
rec_control allows for the --socket-dir option to be specified, but it
shouldn't be necessary, it could find that out itself.
The init script just does PIDFILE=/var/run/$NAME.pid, whereas the pid file
actually gets written into the socket directory (pdns_recursor.cc:writePid()
defines fname as ::arg()["socket-dir"]+"/"+s_programname+".pid").
And then the error handling for that doesn't work, because:
+ PIDFILE=/var/run/pdns_recursor.pid
...
+ echo -n 'Stopping PowerDNS recursor: pdns-recursor'
Stopping PowerDNS recursor: pdns-recursor+ stop
+ start-stop-daemon --stop --quiet --retry=HUP/30/TERM/5/KILL/5 --pidfile
/var/run/pdns_recursor.pid --name pdns_recursor
% echo $?
0
What really happens is:
% sudo start-stop-daemon --stop --quiet --retry=HUP/30/TERM/5/KILL/5 --pidfile
/var/run/pdns_recursor.pid --name pdns_recursor --verbose
No pdns_recursor found running; none killed.
% echo $?
1
start-stop-daemon exits with an error, and then the shell stops the
execution of the entire script, because you use 'set -e'.
You need to put 'set +e' at the beginning of the stop() function to get
the ability to handle non-success exit values in there.
But even then, that error handling is SNAFU. This is what happens:
+ echo -n 'Stopping PowerDNS recursor: pdns-recursor'
Stopping PowerDNS recursor: pdns-recursor+ stop
+ set +e
+ start-stop-daemon --stop --quiet --retry=HUP/30/TERM/5/KILL/5 --pidfile
/var/run/pdns_recursor.pid --name pdns_recursor
+ RETVAL=1
+ '[' 1 = 2 ']'
+ start-stop-daemon --stop --quiet --oknodo --retry=HUP/30/KILL/5 --exec
/usr/sbin/pdns_recursor
+ '[' 0 = 2 ']'
+ rm -f /var/run/pdns_recursor.pid
+ return 1
+ case "$?" in
+ log_progress_msg '(not running)'
...
That's just wrong. The second invocation of start-stop-daemon actually kills
the running pdns_recursor process, and returns 0 because that succeeds,
and that is then falsely reported.
It doesn't look like the same person wrote the stop() function and the main
body, because the intent is clearly not the same...
The Policy manual isn't precise as to what to do in this situation.
It says:
The init.d scripts must ensure that they will behave sensibly if invoked
[...] with stop when [the service] isn't [already running], and that they
don't kill unfortunately-named user processes. The best way to achieve
this is usually to use start-stop-daemon.
This technically allows the current behaviour (killing instances of
/usr/sbin/pdns_recursor which don't have the same pid file) but IMHO
that's not right, because the sysadmin could rightfully have configured
other configurations which shouldn't get killed just because they share
the binaries with the main instance.
The powerdns daemon (the authoritiative one) has that functionality
separated into a 'force-stop' method, so it makes sense for the recursor
to follow suit.
The authoritative one's control program, pdns_control, also does the right
thing with regard to reading variable data from the configuration file.
Please fix this. TIA.
--
2. That which causes joy or happiness.
--- End Message ---
--- Begin Message ---
Source: pdns-recursor
Source-Version: 3.1.7-2
We believe that the bug you reported is fixed in the latest version of
pdns-recursor, which is due to be installed in the Debian FTP archive:
pdns-recursor_3.1.7-2.diff.gz
to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-2.diff.gz
pdns-recursor_3.1.7-2.dsc
to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-2.dsc
pdns-recursor_3.1.7-2_i386.deb
to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-2_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christoph Haas <[EMAIL PROTECTED]> (supplier of updated pdns-recursor package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 14 Sep 2008 17:36:42 +0200
Source: pdns-recursor
Binary: pdns-recursor
Architecture: source i386
Version: 3.1.7-2
Distribution: unstable
Urgency: low
Maintainer: Debian PowerDNS Maintainers <[EMAIL PROTECTED]>
Changed-By: Christoph Haas <[EMAIL PROTECTED]>
Description:
pdns-recursor - PowerDNS recursor
Closes: 478593
Changes:
pdns-recursor (3.1.7-2) unstable; urgency=low
.
* Regard return code from stopping pdns in init.d script (Closes: #478593)
* Fixed init.d script's force-stop function.
Checksums-Sha1:
ae820e503b39241b435d705a7e971dd77747f596 1331 pdns-recursor_3.1.7-2.dsc
e187a82f51eb070f1c52949b4b3c8661984d469a 8098 pdns-recursor_3.1.7-2.diff.gz
d48e60ceb77541f796e7d322c4fb708f724b64df 433168 pdns-recursor_3.1.7-2_i386.deb
Checksums-Sha256:
b7c515c72eedca990a7cc79ccf94252e2727298431c3bbd5cc348bf5ee249978 1331
pdns-recursor_3.1.7-2.dsc
5a4f3c8b338760c2e3158fa5bcfaecd24c9b2f6cf5e11f7c3ac110f313c0c756 8098
pdns-recursor_3.1.7-2.diff.gz
c99e3ad767242e25496d27812fccc936dada5fd6eb084761b5aa6e5764d52f86 433168
pdns-recursor_3.1.7-2_i386.deb
Files:
92f1d04cda1d53bf307d47c6fa17f224 1331 net extra pdns-recursor_3.1.7-2.dsc
600abae4682b033f0b1de3ce102f79d9 8098 net extra pdns-recursor_3.1.7-2.diff.gz
e7db2fa8b997924163e47814d572cf67 433168 net extra
pdns-recursor_3.1.7-2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkjNd5UACgkQCV53xXnMZYb2aACeMj/S9o6PfEvYvtQGzSLtG5zG
+MoAnRw5NtJUX0vQlO1jzPDgCDzjoAFk
=Sugn
-----END PGP SIGNATURE-----
--- End Message ---