Remove internal dump create interface
The createDump method was revised to support key-value
parameters, allowing flexible dump type specification.
This change negates the need for the internal create
interface, exclusive to the phosphor-debug-collector
repository.
This commit removes all instances of the internal create
method, replacing them with the updated createDump method.
The modified createDump approach ensures a consistent dump
initiation procedure and enables all applications to
request various dump types.
Tests:
- Validate the creation of a user-requested BMC dump.
- Validate the creation of a dump due to an InternalFailure.
- Generate a core dump to validate the corresponding BMC dump creation.
- Ensure that system-generated dumps are allowed when user-requested
dump is in progress.
- Ensure simultaneous user requested dumps are prevented
Change-Id: I9f91375788201e2badf51d87f8117154a8e1ed8a
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/dump_manager_bmc.hpp b/dump_manager_bmc.hpp
index 22e688d..82a61c2 100644
--- a/dump_manager_bmc.hpp
+++ b/dump_manager_bmc.hpp
@@ -2,8 +2,8 @@
#include "dump_manager.hpp"
#include "dump_utils.hpp"
+#include "errors_map.hpp"
#include "watch.hpp"
-#include "xyz/openbmc_project/Dump/Internal/Create/server.hpp"
#include <sdeventplus/source/child.hpp>
#include <xyz/openbmc_project/Dump/Create/server.hpp>
@@ -17,30 +17,14 @@
{
namespace bmc
{
-namespace internal
-{
-
-class Manager;
-
-} // namespace internal
using CreateIface = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Dump::server::Create>;
using UserMap = phosphor::dump::inotify::UserMap;
-using Type =
- sdbusplus::xyz::openbmc_project::Dump::Internal::server::Create::Type;
-
using Watch = phosphor::dump::inotify::Watch;
using ::sdeventplus::source::Child;
-// Type to dreport type string map
-static const std::map<Type, std::string> TypeMap = {
- {Type::ApplicationCored, "core"},
- {Type::UserRequested, "user"},
- {Type::InternalFailure, "elog"},
- {Type::Checkstop, "checkstop"},
- {Type::Ramoops, "ramoops"}};
/** @class Manager
* @brief OpenBMC Dump manager implementation.
@@ -51,8 +35,6 @@
virtual public CreateIface,
virtual public phosphor::dump::Manager
{
- friend class internal::Manager;
-
public:
Manager() = delete;
Manager(const Manager&) = default;
@@ -105,14 +87,6 @@
*/
void createEntry(const std::filesystem::path& fullPath);
- /** @brief Capture BMC Dump based on the Dump type.
- * @param[in] type - Type of the Dump.
- * @param[in] fullPaths - List of absolute paths to the files
- * to be included as part of Dump package.
- * @return id - The Dump entry id number.
- */
- uint32_t captureDump(Type type, const std::vector<std::string>& fullPaths);
-
/** @brief Capture BMC Dump based on the Dump type.
* @param[in] type - Type of the dump to pass to dreport
* @param[in] path - An absolute path to the file