Red Hat Bugzilla – Bug 986619
Watchdog 5.5 initrd starts early, causing endless boot loops
Last modified: 2016-09-20 00:33:16 EDT
Description of problem:
Watchdog loads too early in the boot process. In practice, this can cause boot loops if watchdog monitors for a condition that's only met later in the boot process.
Version-Release number of selected component (if applicable):
Reproduces if watchdog starts before a point in the boot process where a valid system state exists. For example, if watchdog is watching varnishd (S90, from EPEL), watchdog won't find its pid file and will immediately reboot the system in the middle of the boot process.
Steps to Reproduce:
1. Set up watchdog to check for a pidfile or a running daemon--for example, to look for the last daemon in the boot process to be running.
2. `chkconfig watchdog on`
Watchdog reboots the system at boot in an eternal boot loop. `init=/bin/bash` or other recovery method needed to fix the system.
Watchdog should load last into a functional system. A boot loop only occurs if system is broken in such a way that it never enters a functional state anyway (this is a natural hazard of using watchdog).
The watchdog-5.5 supplied /etc/init.d/watchdog script has this line up at the top:
# chkconfig: - 46 27
This should be set to:
# chkconfig: - 99 0
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Not a bug with default configuration. That way the link is still to the old script but the priority is updated from the override location.
cp -a /etc/init.d/watchdog /etc/chkconfig.d/watchdog
sed -i /etc/chkconfig.d/watchdog -e 's/^# chkconfig: - 27 46/# chkconfig: - 99 0/'
chkconfig --del watchdog
chkconfig --add watchdog
chkconfig --level 2345 watchdog on