Bug 986619

Summary: Watchdog 5.5 initrd starts early, causing endless boot loops
Product: Red Hat Enterprise Linux 6 Reporter: john.r.moser
Component: watchdogAssignee: Ales Ledvinka <aledvink>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 14:40:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description john.r.moser 2013-07-21 02:38:11 UTC
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):

watchdog-5.5 el6



How reproducible:

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`
3. reboot


Actual results:

Watchdog reboots the system at boot in an eternal boot loop.  `init=/bin/bash` or other recovery method needed to fix the system.



Expected results:

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).



Additional info:

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

Comment 2 RHEL Program Management 2013-10-14 03:05:04 UTC
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.

Comment 3 Ales Ledvinka 2014-06-02 14:40:18 UTC
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