Your message dated Wed, 09 Jul 2008 22:02:11 +0000 with message-id <[EMAIL PROTECTED]> and subject line Bug#471568: fixed in pdns-recursor 3.1.7-1 has caused the Debian Bug report #471568, regarding socket-dir from /etc/powerdns/recursor.conf ignored by init script and rec_control 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.) -- 471568: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471568 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-1 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-1.diff.gz to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-1.diff.gz pdns-recursor_3.1.7-1.dsc to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-1.dsc pdns-recursor_3.1.7-1_i386.deb to pool/main/p/pdns-recursor/pdns-recursor_3.1.7-1_i386.deb pdns-recursor_3.1.7.orig.tar.gz to pool/main/p/pdns-recursor/pdns-recursor_3.1.7.orig.tar.gz 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: Mon, 31 Mar 2008 21:51:59 +0200 Source: pdns-recursor Binary: pdns-recursor Architecture: source i386 Version: 3.1.7-1 Distribution: unstable Urgency: low Maintainer: Debian PowerDNS Maintainers <[EMAIL PROTECTED]> Changed-By: Christoph Haas <[EMAIL PROTECTED]> Description: pdns-recursor - PowerDNS recursor Closes: 471568 476841 477130 490069 Changes: pdns-recursor (3.1.7-1) unstable; urgency=low . * New upstream version (Closes: #490069) (Closes: #477130) * init.d scripts gets socket-dir information from recursor.conf (Closes: #471568) * Added config file directives * Set dont-query to nothing so it won't break pre-3.1.7 configs. (Closes: #476841) Checksums-Sha1: c17be115f7e64e02af299fbe8516cf70e87c0abc 1331 pdns-recursor_3.1.7-1.dsc ef6955b927ad65224b129957bb965a7687981cb8 211760 pdns-recursor_3.1.7.orig.tar.gz e13d6570532a66ae5d2d21af90c3a1f59db6344b 8042 pdns-recursor_3.1.7-1.diff.gz d98433858244e4082c9a278d366183ce9184950d 432688 pdns-recursor_3.1.7-1_i386.deb Checksums-Sha256: 7ae7d5b9854e3cfa25dfbe0b0a06cb0c270b05368ecfe0f088774c38f68cc605 1331 pdns-recursor_3.1.7-1.dsc 5993f82522c19b0c7171ed27be0720d49c17704ad9800877d3407dad7f1c656c 211760 pdns-recursor_3.1.7.orig.tar.gz 167a43499b18c43f4d7425536da2a5e5f4f139ca58ae608e80afbb1f54c8add0 8042 pdns-recursor_3.1.7-1.diff.gz 7124adca0a4d6442f4eb0ce53ce655321ca8a935db9f4f81e4e7b9b0737e2af0 432688 pdns-recursor_3.1.7-1_i386.deb Files: 679d8e0c426964265cc86f9eb4d58d9c 1331 net extra pdns-recursor_3.1.7-1.dsc 38c58fef666685d6756da97baf9b4d51 211760 net extra pdns-recursor_3.1.7.orig.tar.gz 125937376fea51bae55f85b50eddc04e 8042 net extra pdns-recursor_3.1.7-1.diff.gz ed23f21d0e2a4da3a89eadd823ee50e4 432688 net extra pdns-recursor_3.1.7-1_i386.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkh1NAEACgkQCV53xXnMZYZVAACeK3Zie3LqVGaGat7/n6IVMD+I IBkAn3sfn+UAIKWFxy6V+mxoS/ymIuVP =rO4o -----END PGP SIGNATURE-----
--- End Message ---

