Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-08-02 Thread Petter Reinholdtsen
[Petter Reinholdtsen]
 This fix is wrong.  The file is stored in
 /etc/insserv.conf.d/pdns-server/pdns-server.insserv, while it need to
 be stored in /etc/insserv.conf.d/pdns-server.  The extra directory
 level make insserv ignore the file.
 
 Reopening the bug because of this.

It just occured to me, that for pdns to work as $named (ie doing any
DNS lookup), the recursor should be running too.  To ensure this, the
insserv.conf.d/ file should have this content:

  $named pdns +pdns-recursor

The + make the recursor a optional dependency, to make sure init.d
scripts do not fail to install if it is not installed.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-07-25 Thread Petter Reinholdtsen
reopen 585966
found 585966 2.9.22-6
thanks

[Matthijs Mohlmann]
  pdns (2.9.22-6) unstable; urgency=high
  .
* Provide the virtual facility $named. (Closes: #585966)

This fix is wrong.  The file is stored in
/etc/insserv.conf.d/pdns-server/pdns-server.insserv, while it need to
be stored in /etc/insserv.conf.d/pdns-server.  The extra directory
level make insserv ignore the file.

Reopening the bug because of this.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-07-18 Thread Matthijs Möhlmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

What contents should the file /etc/insserv.conf.d/pdns-server have?

For the other bug reported, I'll check if the pdns-server is running or
not before letting the script proceed.

I'm planning to upload the package this afternoon.

Regards,

Matthijs Mohlmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxC3zIACgkQ2n1ROIkXqbB3pQCgo5zdTaC9z88kEgc913rJwMfl
vXwAoIT2VktQEiSCDXDNKrsTeBGpZBOL
=l4Gs
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-07-18 Thread Petter Reinholdtsen
[Matthijs Möhlmann]
 What contents should the file /etc/insserv.conf.d/pdns-server have?

I believe this is the content needed:

  $named pdns

It will add a hard dependency from $named to pdns.

 For the other bug reported, I'll check if the pdns-server is running
 or not before letting the script proceed.

Great.  Not sure if that is enough.  Perhaps it is a idea to verify
that it is listening on its port and replying to requests before
continuing?

The proper fix would be to change the source to make sure the config
is loaded and the ports bound before forking, to ensure the server is
operational.

 I'm planning to upload the package this afternoon.

Great. :)

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-06-25 Thread Petter Reinholdtsen
Hi.  Do you have any feedback on this issue?  Should I NMU to add the
$named virtual facility to at least improve the situation?  Adding
'sleep 5' after starting the service might provide a workaround for
the fact that pdns is not ready to answer requests imediately after
the init.d script ends, by buying more time for pdns to get ready.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-06-16 Thread Petter Reinholdtsen
Hm, making pdns implement the $named virtual facility do not seem to
be enough.  The server is not accepting DNS requests when the init.d
script exits, causing dhcpd to fail to start even if its init.d script
depend on $named.  This syslog snipped show the issue.  Notice how the
LDAP server is operational first, pdns starts, dhcpd starts and then
pdns report that it is listening to DNS requests on TCP and UDP:

Jun 16 13:32:23 tjener slapd[2341]: slapd starting
Jun 16 13:32:24 tjener pdns[2358]: Listening on controlsocket in 
'/var/run/pdns.controlsocket'
Jun 16 13:32:24 tjener pdns[2363]: Guardian is launching an instance
Jun 16 13:32:24 tjener pdns[2363]: Reading random entropy from '/dev/urandom'
Jun 16 13:32:24 tjener dhcpd: Connecting to LDAP server ldap:389
Jun 16 13:32:24 tjener dhcpd: Successfully logged into LDAP server ldap
Jun 16 13:32:24 tjener dhcpd: Cannot find host LDAP entry dhcp 
((objectClass=dhcpServer)(cn=dhcp))
Jun 16 13:32:24 tjener dhcpd: Configuration file errors encountered -- exiting
Jun 16 13:32:24 tjener dhcpd: Internet Systems Consortium DHCP Server V3.1.3
Jun 16 13:32:24 tjener dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Jun 16 13:32:24 tjener dhcpd: All rights reserved.
Jun 16 13:32:24 tjener dhcpd: For info, please visit 
https://www.isc.org/software/dhcp/
Jun 16 13:32:24 tjener dhcpd: Connecting to LDAP server ldap:389
Jun 16 13:32:24 tjener dhcpd: Successfully logged into LDAP server ldap
Jun 16 13:32:24 tjener dhcpd: Cannot find host LDAP entry dhcp 
((objectClass=dhcpServer)(cn=dhcp))
Jun 16 13:32:24 tjener dhcpd: Configuration file errors encountered -- exiting
Jun 16 13:32:24 tjener pdns[2363]: This is a guarded instance of pdns
Jun 16 13:32:24 tjener pdns[2363]: It is advised to bind to explicit addresses 
with the --local-address option
Jun 16 13:32:24 tjener pdns[2363]: UDP server bound to 0.0.0.0:53
Jun 16 13:32:24 tjener pdns[2363]: TCP server bound to 0.0.0.0:53
Jun 16 13:32:24 tjener pdns[2363]: PowerDNS 2.9.22 (C) 2001-2009 PowerDNS.COM 
BV (May 23 2010, 12:35:32, gcc 4.4.4) starting up
Jun 16 13:32:24 tjener pdns[2363]: PowerDNS comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it according to the 
terms of the GPL version 2.
Jun 16 13:32:24 tjener pdns[2363]: DNS Proxy launched, local port 15935, remote 
127.0.0.1:1553
Jun 16 13:32:24 tjener pdns[2363]: Creating backend connection for TCP
Jun 16 13:32:24 tjener pdns[2363]: About to create 3 backend threads for UDP
Jun 16 13:32:24 tjener pdns[2363]: Done launching threads, ready to distribute 
questions

I tried adding 'sleep 2' at the end of the 'start' block in
init.d/pdns, and this changed the ordering to this:

Jun 16 13:41:57 tjener slapd[2155]: slapd starting
Jun 16 13:41:57 tjener pdns[2184]: Listening on controlsocket in 
'/var/run/pdns.controlsocket'
Jun 16 13:41:57 tjener pdns[2187]: Guardian is launching an instance
Jun 16 13:41:57 tjener pdns[2187]: Reading random entropy from '/dev/urandom'
Jun 16 13:41:58 tjener pdns[2187]: This is a guarded instance of pdns
Jun 16 13:41:58 tjener pdns[2187]: UDP server bound to 127.0.0.1:53
Jun 16 13:41:58 tjener pdns[2187]: UDP server bound to 10.0.2.2:53
Jun 16 13:41:58 tjener pdns[2187]: TCP server bound to 127.0.0.1:53
Jun 16 13:41:58 tjener pdns[2187]: TCP server bound to 10.0.2.2:53
Jun 16 13:41:58 tjener pdns[2187]: PowerDNS 2.9.22 (C) 2001-2009 PowerDNS.COM 
BV (May 23 2010, 12:35:32, gcc 4.4.4) starting up
Jun 16 13:41:58 tjener pdns[2187]: PowerDNS comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it
according to the terms of the GPL version 2.
Jun 16 13:41:58 tjener pdns[2187]: DNS Proxy launched, local port 30607, remote 
127.0.0.1:1553
Jun 16 13:41:58 tjener pdns[2187]: Creating backend connection for TCP
Jun 16 13:41:58 tjener pdns[2187]: About to create 3 backend threads for UDP
Jun 16 13:41:58 tjener pdns[2187]: Done launching threads, ready to distribute 
questions
Jun 16 13:41:58 tjener kdm: :0[1961]: ignoring low-UID user (0  1000)
Jun 16 13:41:59 tjener dhcpd: Connecting to LDAP server ldap:389
Jun 16 13:41:59 tjener dhcpd: Successfully logged into LDAP server ldap
Jun 16 13:41:59 tjener dhcpd: Found dhcpServer LDAP entry 
'cn=dhcp,dc=skole,dc=skolelinux,dc=no'
Jun 16 13:41:59 tjener dhcpd: LDAP: Parsing dhcpServer options 
'cn=dhcp,dc=skole,dc=skolelinux,dc=no' ...

This time the LDAP server starts, pdns starts and is ready to handle
DNS requests before dhcpd starts, and the DHCP server is able to get
going at boot.

Can the pdns init.d script or the pdns source be changed to make sure
pdns is operational when the init.d script exits?

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#585966: pdns-server: init.d script should provide the virtual facility $named

2010-06-15 Thread Petter Reinholdtsen

Package:  pdns-server
Version:  2.9.22-5
Severity: grave
Tags: patch
User: debian-...@lists.debian.org
UserTags: debian-edu
User: initscripts-ng-de...@lists.alioth.debian.org
Usertags: incorrect-dependency

The init.d script in the pdns-server package do not provide the
virtual facility $named, causing all init.d scripts expecting the DNS
server to be operational when they start during boot to fail.  I
discovered this with the Debian Edu main-server profile, were we
include a lot of services on the same machine.

Setting the severity to grave, as this causes other packages to fail
to start properly at boot when used on a machine with pdns as the
local DNS resolver.

Providing a virtual facility is implemented by adding a file in
/etc/insserv.conf.d/.

Here is a patch to implement this for pdns-server.

diff -uNr pdns-2.9.22/debian/pdns-server.insserv 
pdns-2.9.22-pere/debian/pdns-server.insserv
--- pdns-2.9.22/debian/pdns-server.insserv  1970-01-01 01:00:00.0 
+0100
+++ pdns-2.9.22-pere/debian/pdns-server.insserv 2010-06-15 10:55:49.858068000 
+0200
@@ -0,0 +1 @@
+$named pdns
diff -uNr pdns-2.9.22/debian/rules pdns-2.9.22-pere/debian/rules
--- pdns-2.9.22/debian/rules2010-04-07 22:34:37.0 +0200
+++ pdns-2.9.22-pere/debian/rules   2010-06-15 10:57:14.054724000 +0200
@@ -87,6 +87,10 @@
# Install the stuff
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C pdns/docs html/index.html
+   # Set up init.d virtual facility
+   mkdir -p $(CURDIR)/debian/pdns-server/etc/insserv.conf.d
+   cp $(CURDIR)/debian/pdns-server.insserv \
+  $(CURDIR)/debian/pdns-server/etc/insserv.conf.d/pdns-server

dh_install
 

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org