Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Tue, Aug 11, 2009 at 05:04:07PM +0200, Petter Reinholdtsen wrote: Why is it a problem that nfs-common and acpi-support are started before wb_keepalive? Or are you talking about citadel, sysklogd and virtualbox-ose-guest-utils? citadel have a bug in its header and Both, the problem is that some hardware requires wd_keepalive to be started asap. should depend on sysklogd (#541075), and the same is the case with webcit (#541071). Thank you for bringing these bugs to my Will fix. Could you please point me to announcement of the changes in the init process? I seem to have missed it. attencion. :) The scripts with the same sequence number might start in parallel, so there is no known ordering of those as long as no dependency information is documented in the init.d script header. Which means wd_keepalive ideally gets a lower number. List the scripts you want wb_keepalive to run before in its X-Start-Before header, to make sure it is started before these scripts. But again, I need to figure out which is the first one so I can list it. :-) I note that it used to start before sysklogd, yet it uses $syslog. If Not anymore, I think we already talked about this. you really want the daemon to start before the syslog server is available, you can use # X-Start-Before: $syslog and remove $syslog from the (Required|Should)-Start headers (to avoid a dependency loop). It would move it before all services depending on a working syslog service. You will have to decide if it make sense in this case or not. It does, I just would prefer to get it even earlier. Portmap for instance is also started before syslog, although I have yet to figure out why. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 11:04:16PM +0200, Petter Reinholdtsen wrote: One problem with $all, is that one can not depend on scripts depending on $all without creating a dependency loop. Ie. a depend on $all, b depend on a, create a dependency loop like this: $all - a - b - $all - a The semantic of $all is thus surprising to most, and I recommend against using it unless no other alternative exist. :) You already have this problem with rmnologin and stop-bootlogd. I'd prefer to start watchdog before stop-bootlogd for obvious reasons. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 10:42:53PM +0200, Petter Reinholdtsen wrote: Why should watchdog have a relationship with all packages in the distribution? How was the previous location selected? Why was it before scripts started with sequence number 90, and after those started with sequence number 88? The reason is that watchdog can be used to monitor other processes. But of course these processes have to run to be monitored. 89 wass chosen just because it happened to be were all the interesting process were already running. This was changed several times over the years. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 09:54:35PM +0200, Petter Reinholdtsen wrote: I had a look at the source of watchdog, and discovered that the calls to init.d script headers did not reflect the arguments used when calling update-rc.d. This make the headers incorrect, and it is vital to have them fixed. Here is a proposal tofix them. It is dropping $local_fs as it is a sub-dependency on $remote_fs, and also dropping $syslog from wd_keepalive.init as it used to start before the syslog Doesn't work: mich...@virtualsid64:~$ ls /etc/rc2.d/ README S17sysklogdS18acpid S18klogd S19bootlogs S15nfs-commonS17virtualbox-ose-guest-utils S18atdS18openbsd-inetd S19hal S17acpi-support S17wd_keepaliveS18cron S18rc.local S20rmnologin S17citadel S17webcit S18dbus S18watchdog S20stop-bootlogd Other scripts are started before wd_keepalive, which is not acceptable. We need a different solution. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
[Michael Meskes] Doesn't work: mich...@virtualsid64:~$ ls /etc/rc2.d/ README S17sysklogd S18acpid S18klogd S19bootlogs S15nfs-common S17virtualbox-ose-guest-utils S18atd S18openbsd-inetd S19hal S17acpi-support S17wd_keepalive S18cron S18rc.local S20rmnologin S17citadel S17webcit S18dbus S18watchdog S20stop-bootlogd Other scripts are started before wd_keepalive, which is not acceptable. Why is it a problem that nfs-common and acpi-support are started before wb_keepalive? Or are you talking about citadel, sysklogd and virtualbox-ose-guest-utils? citadel have a bug in its header and should depend on sysklogd (#541075), and the same is the case with webcit (#541071). Thank you for bringing these bugs to my attencion. :) The scripts with the same sequence number might start in parallel, so there is no known ordering of those as long as no dependency information is documented in the init.d script header. We need a different solution. List the scripts you want wb_keepalive to run before in its X-Start-Before header, to make sure it is started before these scripts. I note that it used to start before sysklogd, yet it uses $syslog. If you really want the daemon to start before the syslog server is available, you can use # X-Start-Before: $syslog and remove $syslog from the (Required|Should)-Start headers (to avoid a dependency loop). It would move it before all services depending on a working syslog service. You will have to decide if it make sense in this case or not. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
reassign 540390 insserv severity 540390 wishlist retitle 540390 A way is needed to start one script earlier than others thanks On Fri, Aug 07, 2009 at 07:20:27PM +0200, Michael Guntsche wrote: If insserv with STARTPAR is used the wd_keepalive AND watchdog are started at the same time. Normally wd_keepalive should be started early, while the real watchdog daemon starts later on. Now both are started in parallel. watchdog stops wd_keepalive during start but depending which one starts first you end up with a watchdog AND a wd_keepalive process. I am not sure how to fix this in the INIT_INFO section. Well, how should it then be a bug in watchdog? :-) I reassign the bug to insserv without evaluating insserv possibilities. If there is a way so the watchdog package can solve this problem, please tell me and reassign back. I don't see one either. Maybe change wd_keepalive to runlevel S? No that's not possible. You don't want to have wd_keepalive running in single user mode. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
reassign 540390 watchdog retitle 540390 Fix boot dependency for wd_keepalive and watchdog thanks I do not understand the problem. You can specify that a given script should run after or before any other script, by specifying this in the LSB header. Documentation is in the insserv manual page and URL:http://wiki.debian.org/LSBInitScripts. As far as I know, dependency based boot sequencing provides everything needed, and thus I reassign this back. Please provide more information if you still need more input from us insserv maintainers. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Aug 8, 2009, at 19:20, Michael Meskes wrote: I reassign the bug to insserv without evaluating insserv possibilities. If there is a way so the watchdog package can solve this problem, please tell me and reassign back. I don't see one either. Well, you can add wd_keepalive to Required-Start: in /etc/init.d/watchdog. This makes sure that it is started before watchdog. In my setup this gives me a S02wd_keepalive and S03watchdog. As for the shutdown. Without any changes you have K01watchdog and K02wd_keepalive. If you use startpar you are probably racing here. Watchdog tries to start wd_keepalive after a delay and at the same time wd_keepalive is trying to stop. So you will probably end up with a running wd_keepalive process. The question now is why stop wd_keepalive at all? Isn't it better to just leave it running? Kind regards, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 07:33:03PM +0200, Petter Reinholdtsen wrote: I do not understand the problem. You can specify that a given script should run after or before any other script, by specifying this in the LSB header. Sorry, it seems I misread stuff. As far as I know, dependency based boot sequencing provides everything needed, and thus I reassign this back. Please provide more information if you still need more input from us insserv maintainers. Does this mean I have to list *all* initscripts that I would want to start after if $all is too much? And if I want to start first? Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 07:56:15PM +0200, Michael Guntsche wrote: wd_keepalive to Required-Start: in /etc/init.d/watchdog. This makes sure that it is started before watchdog. No, this is not the major problem. wd_keepalive has to be started as soon as possible while watchdog had to be pretty much the last one. The question now is why stop wd_keepalive at all? Isn't it better to just leave it running? It is, this is definitely a bug in the LSB header. Without insserv wd_keepalive is not stopped. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
[Michael Meskes] Does this mean I have to list *all* initscripts that I would want to start after if $all is too much? And if I want to start first? You need to list all scripts the given init.d script have a relation to, yes. If two scripts do not have a relation (as in need to start before/after), the scripts should not list a relationship to them. I would avoid $all if at all possible, to avoid surprises and unwanted dependency loops. Please let me know if you need feedback on what to specify in the init.d header and how. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Aug 8, 2009, at 20:49, Michael Meskes wrote: On Sat, Aug 08, 2009 at 07:56:15PM +0200, Michael Guntsche wrote: wd_keepalive to Required-Start: in /etc/init.d/watchdog. This makes sure that it is started before watchdog. No, this is not the major problem. wd_keepalive has to be started as soon as possible while watchdog had to be pretty much the last one. Ok, then instead of depending on wd_keepalive make it depend on $all in Required-Start. As a result watchdog will be started at the end of the runlevel. The question now is why stop wd_keepalive at all? Isn't it better to just leave it running? It is, this is definitely a bug in the LSB header. Without insserv wd_keepalive is not stopped. Please mind, if you remove the Default stop entry and you have K?? wd_keepalive links already in your rc?.d files they are NOT removed. Even calling insserv -d wd_keepalive does not remove them. I did a insserv -r wd_keepalive;insserv wd_keepalive on my system to remove the K?? links. Kind regards, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
I had a look at the source of watchdog, and discovered that the calls to init.d script headers did not reflect the arguments used when calling update-rc.d. This make the headers incorrect, and it is vital to have them fixed. Here is a proposal tofix them. It is dropping $local_fs as it is a sub-dependency on $remote_fs, and also dropping $syslog from wd_keepalive.init as it used to start before the syslog implementation. Default-Stop runlevels listed in wd_keepalive are not used in the call to update-rc.d, and I thus assume they are wrong in the header. With this change, wd_keepalive is started early only in runlevels 2-5, and watchdog will start after it. If you want watchdog to start after other scripts as well, these scripts should be listed in a Should-Start header (and probably also in a Should-Stop) to get it to stop before these other init.d scripts. diff -ur watchdog-5.6/debian/init watchdog-5.6-pere/debian/init --- watchdog-5.6/debian/init2009-08-08 21:49:14.0 +0200 +++ watchdog-5.6-pere/debian/init 2009-08-08 21:48:50.0 +0200 @@ -4,8 +4,8 @@ ### BEGIN INIT INFO # Provides: watchdog # Short-Description: Start software watchdog daemon -# Required-Start:$local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog +# Required-Start:$remote_fs $syslog wd_keepalive +# Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO diff -ur watchdog-5.6/debian/wd_keepalive.init watchdog-5.6-pere/debian/wd_keepalive.init --- watchdog-5.6/debian/wd_keepalive.init 2009-03-12 14:41:04.0 +0100 +++ watchdog-5.6-pere/debian/wd_keepalive.init 2009-08-08 21:49:00.0 +0200 @@ -4,10 +4,10 @@ ### BEGIN INIT INFO # Provides: wd_keepalive # Short-Description: Start watchdog keepalive daemon -# Required-Start:$local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog +# Required-Start:$remote_fs +# Required-Stop: $remote_fs # Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 +# Default-Stop: ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 09:17:23PM +0200, Petter Reinholdtsen wrote: You need to list all scripts the given init.d script have a relation to, yes. If two scripts do not have a relation (as in need to start before/after), the scripts should not list a relationship to them. I would avoid $all if at all possible, to avoid surprises and unwanted dependency loops. But this means that I have to change my dependency list every time a new package with an init script comes into the distribution. Doesn't sound like a good idea at all. Please let me know if you need feedback on what to specify in the init.d header and how. Sure, be my guest. Watchdog used to be started at S89. How do I make sure it gets the same spot? Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
On Sat, Aug 08, 2009 at 09:54:35PM +0200, Petter Reinholdtsen wrote: $local_fs as it is a sub-dependency on $remote_fs, and also dropping $syslog from wd_keepalive.init as it used to start before the syslog implementation. Default-Stop runlevels listed in wd_keepalive are not used in the call to update-rc.d, and I thus assume they are wrong in the header. With this change, wd_keepalive is started early only in Right, this is already fixed in git. runlevels 2-5, and watchdog will start after it. If you want watchdog to start after other scripts as well, these scripts should be listed in a Should-Start header (and probably also in a Should-Stop) to get it to stop before these other init.d scripts. Watchdog should start after all server processes as it can be used to monitor these processes. This is why I thought about $all. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
[Michael Meskes] But this means that I have to change my dependency list every time a new package with an init script comes into the distribution. Doesn't sound like a good idea at all. Why should watchdog have a relationship with all packages in the distribution? How was the previous location selected? Why was it before scripts started with sequence number 90, and after those started with sequence number 88? Sure, be my guest. Watchdog used to be started at S89. How do I make sure it gets the same spot? Well, what was it supposed to run before and after? Sequence numbers will be generated dynamically from now on, so the spot will be a dynamic location based on dependency information provided by each script. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
[Michael Meskes] Right, this is already fixed in git. Great. Watchdog should start after all server processes as it can be used to monitor these processes. This is why I thought about $all. One problem with $all, is that one can not depend on scripts depending on $all without creating a dependency loop. Ie. a depend on $all, b depend on a, create a dependency loop like this: $all - a - b - $all - a The semantic of $all is thus surprising to most, and I recommend against using it unless no other alternative exist. :) Is there anything starting after watchdog that needed to start after watchdog? If not, $all will probably work for this script. If there is, $all will not work and individual dependencies need to be used. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#540390: watchdog: wd_keepalive problem if started with startpar
Package: watchdog Version: 5.6-4 Severity: normal If insserv with STARTPAR is used the wd_keepalive AND watchdog are started at the same time. Normally wd_keepalive should be started early, while the real watchdog daemon starts later on. Now both are started in parallel. watchdog stops wd_keepalive during start but depending which one starts first you end up with a watchdog AND a wd_keepalive process. I am not sure how to fix this in the INIT_INFO section. Maybe change wd_keepalive to runlevel S? -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.31-rc5 Locale: LANG=C, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages watchdog depends on: ii debconf [debconf-2.0] 1.5.27 Debian configuration management sy ii libc6 2.9-23 GNU C Library: Shared libraries ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip ii makedev 2.3.1-89 creates device files in /dev ii udev 0.141-1/dev/ and hotplug management daemo watchdog recommends no packages. watchdog suggests no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org