Add elog dump type to common create
This commit modifies the Elog BMC dump creation process
to utilize the common BMC dump creation interface. Elog
BMC dumps are a special type of dumps triggered upon the
logging of certain predefined set of error logs. These
dumps incorporate data based on the type of the error log.
If no error log type is specified, a default elog dump
will be generated. In the existing process, upon occurrence
of a predefined error log, the error log manager would
inform the dump manager via an internal DBus interface. Now,
with this change, the error log manager will request the
dump manager to create an Elog BMC dump that includes the
relevant error data, error type, and the object path of the
error log entry via the common create DBus interface.
Test:
Create an InternalFailure and sure dump is created
>busctl call xyz.openbmc_project.Logging \
/xyz/openbmc_project/logging \
xyz.openbmc_project.Logging.Create Create ssa{ss} \
xyz.openbmc_project.Common.Error.InternalFailure \
xyz.openbmc_project.Logging.Entry.Level.Error 0
Trace:
phosphor-dump-manager[542]: Initiating new BMC dump \
with type: elog path: /xyz/openbmc_project/logging/entry/12
phosphor-dump-manager[2918]: Report is available in \
/var/lib/phosphor-debug-collector/dumps/6
Change-Id: I734b052fc24e7893a61755790be49e8a1e594be5
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/elog_watch.hpp b/elog_watch.hpp
index 3806ed8..9fa270a 100644
--- a/elog_watch.hpp
+++ b/elog_watch.hpp
@@ -7,6 +7,7 @@
#include <cereal/access.hpp>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server.hpp>
+#include <xyz/openbmc_project/Dump/Create/server.hpp>
#include <filesystem>
#include <set>
@@ -18,7 +19,7 @@
namespace elog
{
-using IMgr = phosphor::dump::bmc::internal::Manager;
+using Mgr = phosphor::dump::bmc::Manager;
using EId = uint32_t;
using ElogList = std::set<EId>;
@@ -41,7 +42,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] intMgr - Dump internal Manager object
*/
- Watch(sdbusplus::bus_t& bus, IMgr& iMgr);
+ Watch(sdbusplus::bus_t& bus, Mgr& mgr);
private:
friend class cereal::access;
@@ -84,8 +85,8 @@
return std::stoul(path.filename());
}
- /** @brief Dump internal Manager object. */
- IMgr& iMgr;
+ /** @brief BMC Dump Manager object. */
+ Mgr& mgr;
/** @brief sdbusplus signal match for elog add */
sdbusplus::bus::match_t addMatch;