summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-09-30 09:39:49 +0300
committerThomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com>2019-10-24 04:11:20 +0300
commit4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86 (patch)
treee577a720c400573b1c0d2f3ee07f9ca6ba0445a4
parent539d09b56999fec005018e51ebfb435809c394cf (diff)
downloadprovingground-4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86.tar.xz
special-mode-mgr: Log events for mfg mode change
Support added to log events for mfg mode, which can be viewed using Redfish event log entries. This will indicate, whenever manufacturing mode is entered or exited. Tested: Tested the same with up-stream message entry review https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/25687/ 1. Redfish validator - passed for this new addition 2. Log will be as below (for both tampering and normalized) { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/317", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:05:17+00:00", "EntryType": "Event", "Id": "317", "Message": "Entered Manufacturing Mode", "MessageArgs": [], "MessageId": "OpenBMC.0.1.ManufacturingModeEntered", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/899", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:14:59+00:00", "EntryType": "Event", "Id": "899", "Message": "Exited Manufacturing Mode", "MessageArgs": [], "MessageId": "OpenBMC.0.1.ManufacturingModeExited", "Name": "System Event Log Entry", "Severity": "OK" } Change-Id: I417e5bd2e179592e1be0083eeb8759e348554bff Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
-rw-r--r--special-mode-mgr/src/specialmodemgr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/special-mode-mgr/src/specialmodemgr.cpp b/special-mode-mgr/src/specialmodemgr.cpp
index 93f36e5..f1ed722 100644
--- a/special-mode-mgr/src/specialmodemgr.cpp
+++ b/special-mode-mgr/src/specialmodemgr.cpp
@@ -175,6 +175,9 @@ void SpecialModeMgr::checkAndAddSpecialModeProperty(const std::string& provMode)
{
specialMode = manufacturingMode;
specialModeLockoutSeconds = mtmAllowedTime - sysInfo.uptime;
+ sd_journal_send("MESSAGE=%s", "Manufacturing mode - Entered",
+ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s",
+ "OpenBMC.0.1.ManufacturingModeEntered", NULL);
}
addSpecialModeProperty();
if (!specialModeLockoutSeconds)
@@ -229,6 +232,9 @@ void SpecialModeMgr::updateTimer(int countInSeconds)
}
iface->set_property(strSpecialMode,
static_cast<uint8_t>(manufacturingExpired));
+ sd_journal_send("MESSAGE=%s", "Manufacturing mode - Exited",
+ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s",
+ "OpenBMC.0.1.ManufacturingModeExited", NULL);
});
}