On Wed, Nov 12, 2014 at 02:44:53PM +0100, Michael Biebl wrote: > Yeah, it shows that watchdog.service is involved in dependency cycle and > systemd therefore removes it from the transaction.
Why doesn't it show the same reaction on my system then? Uwe's system doesn't seem to have any changes out of the ordinary. Any idea? > > After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target > > runlevel5.target > > I don't think this does and please don't use that in a service file. We > don't really want to drag that legacy concept of SysV runlevels into > native .service files. I'm fine with any other solution. Problem is that this piece of systemd doesn't seem to be very well documented or I just didn't find anything. > Couldn't you just run "ExecStartPre=-/sbin/modprobe $watchdog_module"? > The "-" would ignore any errors Should do, just never occured to me. > > ExecStartPre=/bin/systemctl stop wd_keepalive > > Calling systemctl from service files is highly discouraged, I'd go as > far as say forbidden unless you know exactly what you're doing. > Can you elaborate why this is necessary? Sure, wd_keepalive is supposed to run whenever watchdog is not. But they cannot run at the same time, so wd_keepalive has to be stopped for watchdog to be started. > > ExecStart=/usr/sbin/watchdog $watchdog_options > > ExecStopPost=/bin/systemctl start wd_keepalive > > Same here. Does that mean, on shutdown, when all services are about to > be stopped, you start wd_keepalive? Why? Yes, indeed that is what we need. Watchdog triggers a special device to tell the hardware watchdog that everything is well. When it is stopped it closes the device and obviously stops triggering it. Normally that means the hardware watchdog is disabled. However, there is a kernel setting called CONFIG_WATCHDOG_NOWAYOUT or somesuch that makes the kernel not accept the closing, meaning the hardware watchdog stays on alert and triggers a reset after a while. With watchdog having to be stopped early (it could be monitoring other services) the system might run into a reset by the watchdog before its shutdown has been finished. Therefore we need a small program doing nothing but triggering the device, which is wd_keepalive. Hopefully this very brief explanation makes sense. 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 Jabber: michael.meskes at gmail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org