diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:42:44 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-04-17 19:13:25 +0300 |
commit | 816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5 (patch) | |
tree | 341534fed9a2de460ded7f8231ca1cbb178bb2ca /meta-openbmc-mods/meta-common/recipes-phosphor/watchdog | |
parent | a75bff085ba9443315222231c42692745e5781e9 (diff) | |
download | openbmc-816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5.tar.xz |
Update 4-15-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog')
3 files changed, 51 insertions, 29 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-expiredTimerUse-property-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-expiredTimerUse-property-support.patch deleted file mode 100644 index 54e459245..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-expiredTimerUse-property-support.patch +++ /dev/null @@ -1,28 +0,0 @@ -From efb3c226fc80243729901f675568b2b41142b1f9 Mon Sep 17 00:00:00 2001 -From: Yong Li <yong.b.li@linux.intel.com> -Date: Mon, 18 Mar 2019 22:54:41 +0800 -Subject: [PATCH] Add expiredTimerUse property support - -When the timer expired, set expiredTimerUse property as the timer use - -Signed-off-by: Yong Li <yong.b.li@linux.intel.com> ---- - watchdog.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/watchdog.cpp b/watchdog.cpp -index aed0443..d529746 100644 ---- a/watchdog.cpp -+++ b/watchdog.cpp -@@ -101,6 +101,8 @@ void Watchdog::timeOutHandler() - action = fallback->action; - } - -+ WatchdogInherits::expiredTimerUse(WatchdogInherits::currentTimerUse()); -+ - auto target = actionTargetMap.find(action); - if (target == actionTargetMap.end()) - { --- -2.7.4 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-redfish-log-support-for-IPMI-watchdog-timeout-ac.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-redfish-log-support-for-IPMI-watchdog-timeout-ac.patch new file mode 100644 index 000000000..6e057f681 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Add-redfish-log-support-for-IPMI-watchdog-timeout-ac.patch @@ -0,0 +1,50 @@ +From 1c0e658833ea7595b2fb42261ce5e0ce781bac98 Mon Sep 17 00:00:00 2001 +From: Yong Li <yong.b.li@linux.intel.com> +Date: Thu, 4 Apr 2019 18:24:54 +0800 +Subject: [PATCH] Add redfish log support for IPMI watchdog timeout actions + +The current plan is that only threshold sensor events +will be logged to the IPMI SEL, +and all other events will be logged to the Redfish Event Log. + +Tested: +Config IPMI watchdog: OEM hard reset after 10 seconds: +ipmitool raw 0x06 0x24 0x5 0x1 0x0 0x0 0x64 0x00 +Start watchdog: +Ipmitool mc watchdog reset +Check the redfish logs in 10 seconds: +https://BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries + +Signed-off-by: Yong Li <yong.b.li@linux.intel.com> +--- + watchdog.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/watchdog.cpp b/watchdog.cpp +index d529746..008cde5 100644 +--- a/watchdog.cpp ++++ b/watchdog.cpp +@@ -1,5 +1,7 @@ + #include "watchdog.hpp" + ++#include <systemd/sd-journal.h> ++ + #include <chrono> + #include <phosphor-logging/elog.hpp> + #include <phosphor-logging/log.hpp> +@@ -115,6 +117,12 @@ void Watchdog::timeOutHandler() + entry("ACTION=%s", convertForMessage(action).c_str()), + entry("TARGET=%s", target->second.c_str())); + ++ // Log into redfish event log ++ sd_journal_send("MESSAGE=IPMIWatchdog: Timed out ACTION=%s; TARGET=%s", ++ convertForMessage(action).c_str(), ++ target->second.c_str(), "PRIORITY=%i", LOG_INFO, ++ "REDFISH_MESSAGE_ID=%s", "IPMIWatchdog", NULL); ++ + try + { + auto method = bus.new_method_call(SYSTEMD_SERVICE, SYSTEMD_ROOT, +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend index 5f8d53976..6411c209d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -SRC_URI += "file://0001-Add-expiredTimerUse-property-support.patch" +SRC_URI += "file://0001-Add-redfish-log-support-for-IPMI-watchdog-timeout-ac.patch" # Remove the override to keep service running after DC cycle SYSTEMD_OVERRIDE_${PN}_remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf" |