summaryrefslogtreecommitdiffstats
path: root/app/watchdog_service.cpp
Commit message (Collapse)AuthorAgeFilesLines
* add .clang-formatPatrick Venture2018-09-071-11/+9
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* app/watchdog_service: More useful error outputWilliam A. Kennington III2018-07-181-13/+45
| | | | | | | | This patch adds error handling around the decoding of requests to the watchdog service, to give more useful context in the case of errors. Change-Id: If668b17e88dc65a938b69d8c2cdd760456170962 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Get only the initialized property during resetWilliam A. Kennington III2018-05-221-0/+29
| | | | | | | | | | Since we switched to resetting the watchdog with a built-in method, we are only using a single property from the watchdog. Instead of fetching all the properties and reading just the initialized one, only request the initialized property from the watchdog. Change-Id: I5e29b5100629e1ce23f352b0b749a434cd1ab793 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Use ResetTimeRemaining for wd_resetWilliam A. Kennington III2018-05-221-0/+22
| | | | | | | | Using this helper method reduces the number of dbus calls made during each watchdog reset. Change-Id: I373db3babe03e05fca33eb4dbbbc7c07f95a39ea Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog_service: Convert runtime errors to internal failuresWilliam A. Kennington III2018-05-221-2/+14
| | | | | | | | We want to better adhere to the openbmc convention of logging our errors and reporting and internal exception upstack. Change-Id: I78a277ed564b1ac269d84c024b75d2b0f534e911 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Retry dbus requests if the service was cachedWilliam A. Kennington III2018-05-111-0/+12
| | | | | | | | | | | | Right now if the phosphor-watchdog gets restarted, the first ipmi request querying it will fail and return all the way back up to the ipmi client. In this case, it would be nicer for the client if we retried the request once before reporting a failure. Resolves openbmc/phosphor-host-ipmid#111 Change-Id: I73fce5431911279f9c2e4389d32b671ed60c2305 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Cache service nameWilliam A. Kennington III2018-04-021-7/+7
| | | | | | | | | | | | | | | | | | | | | We have occasionally noticed that the watchdog will be enabled and then immediately trip upon booting of the BMC. This happens if the host is still running when the BMC is coming up. Digging into the issue we notice that the phosphor-mapper can be under very heavy load responding to all of the initial mapping requests from BMC daemons starting. This causes a delay in the phosphor-watchdog service name lookup during an attempt to reset the watchdog countdown. The lookup delay is so long that the watchdog ends up tripping before the reset is actually issued, causing the BMC to reset the host. Since we know that the watchdog will not be armed until the service resolves for the first time, we can reduce the dependence and pressure on the service mapper by caching the service name. Since it is the case that we want to keep issuing resets to the same daemon that was initially configured, we should have no worries about invalidating the cached service name. The name will be invalidated any time we encounter a dbus level error issuing a watchdog commmand. Change-Id: I303a39be997c2e57050b71efc8ef2e2cb27f8cf7 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement watchdog action settingWilliam A. Kennington III2018-02-211-0/+10
| | | | | | | | We now respect the action set during the SetTimeout command. This maps to one of the actions defined by the dbus Watchdog interface Change-Id: I4d13d2539a2d955a4340bf5f915ca6f3b694550a Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement initialized using the new dbus interfaceWilliam A. Kennington III2018-02-211-0/+6
| | | | | | | | | This makes it possible for the phosphor-host-ipmi or any other watchdog managing daemon to report to the caller that the watchdog was not configured if the phosphor-watchdog daemon restarts for any reason. Change-Id: Iae3a8554c2f5d1cb89368f3ce14b3d44922599c0 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Rewrite using sdbusplusWilliam A. Kennington III2018-02-211-0/+69
Change-Id: I730317954819859d23fdaca7336f19f5c5b0c107 Signed-off-by: William A. Kennington III <wak@google.com>
OpenPOWER on IntegriCloud