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.

Manual 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

Checkstop dump
busctl call xyz.openbmc_project.Logging  /xyz/openbmc_project/logging \
   xyz.openbmc_project.Logging.Create Create ssa{ss} \
   org.open_power.Host.Boot.Error.Checkstop  \
   xyz.openbmc_project.Logging.Entry.Level.Error 0

Logs:
 Initiating new BMC dump with type: checkstop path: /xyz/openbmc_\
project/logging/entry/78
 performing dump compression /tmp/BMCDUMP.XX.0000003.20230724015349
 Report is available in /var/lib/phosphor-debug-collector/dumps/3

Automated tests:
Create_And_Delete_User_Initiated_BMC_Dump_Multiple_Times
Create_Two_User_Initiated_BMC_Dumps
Create_Two_User_Initiated_BMC_Dumps_And_Delete_One
Delete_All_User_Initiated_BMC_Dumps_And_Verify
Delete_User_Initiated_BMC_Dump_And_Verify
Verify_BMC_Core_Dump_When_Host_Powered_Off
Verify_BMC_Dump_Create_Errors_While_Another_BMC_Dump_In_Progress
Verify_BMC_Dump_Default_Location_In_BMC
Verify_Core_Dump_Size
Verify_Core_Watchdog_Initiated_BMC_Dump
Verify_Dump_Persistency_On_BMC_Reset
Verify_Dump_Persistency_On_Dump_Service_Restart
Verify_Error_Log_And_Dump_For_Internal_Failure
Verify_Error_Response_For_Already_Deleted_Dump_Id
Verify_Error_While_Initiating_BMC_Dump_During_Dumping_State
Verify_Internal_Failure_Initiated_BMC_Dump_Size
Verify_Multiple_BMC_Dump_Creation
Verify_User_Initiated_BMC_Dump_At_Host_Booting
Verify_User_Initiated_BMC_Dump_Size
Verify_User_Initiated_BMC_Dump_When_Host_Booted
Verify_User_Initiated_BMC_Dump_When_Host_Powered_Off

Built with master and p10bmc

Change-Id: I9f91375788201e2badf51d87f8117154a8e1ed8a
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
12 files changed
tree: f7cd01fb6c0bd7abc8caad18fcaa5395beb9c251
  1. dump-extensions/
  2. host-transport-extensions/
  3. subprojects/
  4. test/
  5. tools/
  6. .clang-format
  7. .gitignore
  8. .shellcheck-ignore
  9. bmc_dump_entry.cpp
  10. bmc_dump_entry.hpp
  11. core_manager.cpp
  12. core_manager.hpp
  13. core_manager_main.cpp
  14. dump-extensions.hpp
  15. dump_entry.cpp
  16. dump_entry.hpp
  17. dump_manager.cpp
  18. dump_manager.hpp
  19. dump_manager_bmc.cpp
  20. dump_manager_bmc.hpp
  21. dump_manager_faultlog.cpp
  22. dump_manager_faultlog.hpp
  23. dump_manager_main.cpp
  24. dump_offload.cpp
  25. dump_offload.hpp
  26. dump_serialize.cpp
  27. dump_serialize.hpp
  28. dump_types.mako.cpp
  29. dump_types.mako.hpp
  30. dump_utils.cpp
  31. dump_utils.hpp
  32. elog_watch.cpp
  33. elog_watch.hpp
  34. example_dump_types.yaml
  35. example_errors_watch.yaml
  36. faultlog_dump_entry.cpp
  37. faultlog_dump_entry.hpp
  38. ffdc
  39. host_transport_exts.hpp
  40. LICENSE
  41. map_gen.py
  42. meson.build
  43. meson.options
  44. OWNERS
  45. ramoops_manager.cpp
  46. ramoops_manager.hpp
  47. ramoops_manager_main.cpp
  48. README.md
  49. watch.cpp
  50. watch.hpp
README.md

phosphor-debug-collector

Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.

One such mechanism is dreport, a script that collects debug data and packages it into an archive file.

To Build

To build this package with meson, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To clean the built files run ninja -C builddir clean.

To run unit tests

Tests can be run in the CI docker container, refer local-ci-build

or with an OpenBMC x86 sdk(see below for x86 steps).

meson -Dtests=enabled build
ninja -C build test