Bug 1302211

Summary: systemd does not support watchdog daemon
Product: Red Hat Enterprise Linux 7 Reporter: Pratyush Anand <panand>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: dyoung, kdump-team-bugs, ruyang, systemd-maint-list
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: 2016-03-28 09:00:28 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:

Description Pratyush Anand 2016-01-27 08:02:01 UTC
Description of problem:

By adding a non-zero value for ShutdownWatchdogSec in /etc/systemd/system.conf should enable watchdog daemon, but we do not see watchdog activated by doing so.

Version-Release number of selected component (if applicable):

systemd-219-19.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Add  ShutdownWatchdogSec=40s in /etc/systemd/system.conf and reboot
2. Now find a way to verify if watchdog is active. You should see it active.

One of the way to verify could be following. Apply following patches on top of kernel-3.10.0-344.el7.

http://git.engineering.redhat.com/git/users/panand/linux.git/commit/?h=rhel7_watchdog&id=8d451fc8457b97fe89167a86761ca3939d6daea3
http://git.engineering.redhat.com/git/users/panand/linux.git/commit/?h=rhel7_watchdog&id=d71da28e0ae8053ab5773a464284ebd72437e1a6
http://git.engineering.redhat.com/git/users/panand/linux.git/commit/?h=rhel7_watchdog&id=2c0af95c9a86759a3b7a0b33c33ff82611fd1b8c
http://git.engineering.redhat.com/git/users/panand/linux.git/commit/?h=rhel7_watchdog&id=e9e837ee4357fbd3706664d12e820ad3de19e0c0

and then if you cat /sys/class/watchdog/watchdogn/state, you should see it active.

3.

Actual results:
Watchdog ineactive

Expected results:
Active watchdog when ShutdownWatchdogSec=40s is added in /etc/systemd/system.conf

Comment 2 Pratyush Anand 2016-01-27 10:33:52 UTC
Not sure, if it was expected, but if I put RuntimeWatchdogSec=40s in /etc/systemd/system.conf, it works fine. However, ShutdownWatchdogSec=40s was working in FC22. So, may be its not a bug and rather my wrong understanding.

Comment 3 Pratyush Anand 2016-03-28 09:00:28 UTC
It was my wrong understanding about ShutdownWatchdogSec.                                                            
Definition says:                                                                                                                        
ShutdownWatchdogSec= may be used to configure the hardware watchdog when the                                                            
system is asked to reboot. It works as a safety net to ensure that the reboot                                                           
takes place even if a clean reboot attempt times out. By default                                                                        
RuntimeWatchdogSec= defaults to 0 (off), and ShutdownWatchdogSec= to 10min                                                              
                                                                                                                                        
                                                                                                                                        
So, as per definition "ShutdownWatchdogSec" should be effective only in case of                                                         
reboot. For the normal scenario "RuntimeWatchdogSec" should be used, which is                                                           
defined as:                                                                                                                             
                                                                                                                                        
RuntimeWatchdogSec= is set to a non-zero value, the watchdog hardware                                                                   
(/dev/watchdog) will be programmed to automatically reboot the system if it is                                                          
not contacted within the specified timeout interval. The system manager will                                                            
ensure to contact it at least once in half the specified timeout interval.                                                              
                                                                                                                                        
Since RuntimeWatchdogSec worked fine in RHEL, so I closing this bug.