Request hostboot dump when Host State is 'Running'

When CurrentHostStatus is not in 'Running' state, either host is 'Off'
or current state is changed by HW dump to a state other than 'Running'
and may have initiated/created the dump. In these cases, there is
no need to initiate hostboot dump. This commit allows initiating
hostboot dump collection when the current host state is 'Running'
and the watchdog times out.

Testing:
Run watchdog_timeout and check the following entries in the journal log:
'Running' state:
Mar 03 12:22:34 <xxxx> watchdog_timeout[3626]: Host did not respond
within watchdog timeout interval
Mar 03 12:22:34 <xxxx> watchdog_timeout[3626]: Handle Hostboot boot
failure
Mar 03 12:22:34 <xxxx> watchdog_timeout[3626]: hostboot dump
requested
Mar 03 12:23:26 <xxxx> watchdog_timeout[3626]:
/xyz/openbmc_project/dump/hostboot/entry/20000028
Mar 03 12:23:26 <xxxx> watchdog_timeout[3626]:
xyz.openbmc_project.Common.Progress.OperationStatus.Completed
Mar 03 12:23:26 <xxxx> watchdog_timeout[3626]: dump collection
completed

'Quiesced' state:
Mar 03 12:26:04 <xxxx> watchdog_timeout[3917]: Host did not respond
within watchdog timeout interval
Mar 03 12:26:04 <xxxx> watchdog_timeout[3917]: Host is not in
'Running' state. Dump maybe already occurring, skipping this dump
request...

Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com>
Change-Id: I7245fef1639299bf501667eef48e275a93307c00
3 files changed
tree: 7751267b7428ee0b9f8c5bd9cdbfb3708f0bc644
  1. gen/
  2. phosphor-logging/
  3. subprojects/
  4. watchdog/
  5. yaml/
  6. .clang-format
  7. .gitignore
  8. checkstop_app.cpp
  9. LICENSE
  10. meson.build
  11. meson_options.txt
  12. OWNERS
  13. README.md
  14. watchdog_timeout.cpp
README.md

Building the Code

To build this package, do the following steps:

    1. meson build
    2. ninja -C build

To clean the repository run `rm -rf build`.