#
93f06410 |
| 02-Jun-2024 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add Serialization Support for Dump Entry Attributes
Implemented serialization of dump entry attributes using the nlohmann::json library. Added serialization support in the Dump Entry class, serializ
Add Serialization Support for Dump Entry Attributes
Implemented serialization of dump entry attributes using the nlohmann::json library. Added serialization support in the Dump Entry class, serializing attributes including originatorId, originatorType, and startTime. These attributes are not part of the dump filename and thus require serialization to ensure their state is preserved.
Deserialization will occur only if the serialization version matches and the dump ID in the dump object matches the ID in the serialized file.
Tests: - Created BMC dumps and restarted service - Created BMC dumps and restarted BMC - Created 200 BMC dumps and restarted service and BMC multiple times
File: ``` {"dumpId":2,"originatorId":"","originatorType":1,"startTime":1718199238942411,"version":1} ```
Change-Id: I16ecb058bddd464c8771bd8d08a50ea1877747ed Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
64f8da9e |
| 08-Dec-2021 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Implement GetFileHandle in dump entry interface
Certain applications need to offload the dump in various ways, for example, performing DMA transfer of the dump to the host memory. These applications
Implement GetFileHandle in dump entry interface
Certain applications need to offload the dump in various ways, for example, performing DMA transfer of the dump to the host memory. These applications require direct access to the file to read from the BMC storage.
This commit introduces the GetFileHandle method in the dump entry interface. This method provides direct access to the Unix file handle of the dump entry, facilitating more direct read operations on the dump file. The returned file descriptor is read-only, which ensures the integrity of the dump file.
The definition of the file handle is moved from the specific 'bmc_dump_entry' class to the parent 'dump_entry' class. This allows all dump types inheriting from 'dump_entry' to use this new method, thus increasing its utility across various dump types.
The introduction of this method primarily benefits PLDM for offloading the dump to the host, and bmcweb for offloading the dump to Redfish clients. By providing a file handle instead of exposing the file path, it resolves potential access issues for applications running in non-root contexts.
Test: Created a dump and made sure it reached host successfully Executed with additional traces Jun 21 10:56:09 pldmd[1856]: Requesting file handle Jun 21 10:56:09 pldmd[1856]: File handle received fd=9 Jun 21 10:56:09 pldmd[1856]: Transfer data rc= 0 Jun 21 10:56:09 phosphor-dump-manager[480]: File handle \ request Jun 21 10:56:09 phosphor-dump-manager[480]: returning fd=11 Jun 21 10:56:09 pldmd[1856]: File handle received fd=9 Jun 21 10:56:09 pldmd[1856]: File read rc=15
In th host: Service Processor Dump: Maximum file size: 0 (0x00000000) bytes (0 MBs) Dumps this PHYP IPL: 1 Pending Dump: Dump ID: 00000009 File size: 3749662 \ (0x000000000039371E) bytes (3 MBs) SP dump sub type: 0x000000000000000F BMC File name: \ BMCDUMP.1392A20.00000009.20230621105510 Dump create time: 06/21/2023 10:55:10.00 PHYP notify time: 06/21/2023 10:56:00.5918570000 LP recipient: 1 LP notify time: 06/21/2023 10:56:00.5918580000
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: If398940b655b4d90688273f0c76a20d4ead61992
show more ...
|
#
74a1f39c |
| 27-Oct-2021 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Implement OriginatedBy interface in dump entry dbus obj
This new interface "OriginatedBy" will be implemented by all the dump entry dbus objects. It contains a property "OriginatorId" which stores t
Implement OriginatedBy interface in dump entry dbus obj
This new interface "OriginatedBy" will be implemented by all the dump entry dbus objects. It contains a property "OriginatorId" which stores the unique id of the user that has initiated the dump. The unique id in this case is a string that contains the ip address of the client that initiated the dump.
The dbus interface change for the same is at: [1] https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/47057
Tested By:
[1] busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client" o "/xyz/openbmc_project/dump/bmc/entry/2"
[2] busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/resource xyz.openbmc_project.Dump.Create CreateDump a{sv} 4 "com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" "com.ibm.Dump.Create.CreateParameters.Password" s "password" "com.ibm.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client" MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1"; };
[3] busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/system xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "com.ibm.Dump.Create.CreateParameters.OriginatorId" s "<unique-id>" "xyz.openbmc_project.Dump.Create.CreateParameters.OriginatorType" s "xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client" o "/xyz/openbmc_project/dump/system/entry/1"
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I23c9f769fd39cd84e042d6effbb3d71c7af4e889
show more ...
|
#
270355ba |
| 01-Feb-2022 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add method to get dump id
Add method to get dump id from the dump entry object. This will useful in adding trace
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I6f6ac3b1
Add method to get dump id
Add method to get dump id from the dump entry object. This will useful in adding trace
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I6f6ac3b1fb773c85ff12ea6094f9abb6b2243d83
show more ...
|
#
9b18bf2d |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7ae6214461bdf45c1a21fb702cc8bf5578d827c6
show more ...
|
#
73f64076 |
| 01-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit` or `action::emit_no_signals` as appropriate.
- DumpEntry: emit_no_signals (secondary object) - {bmc,resource,system}::DumpEntry: defer_emit (primary object) - Manager: defer_emit (primary object)
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I91990031384230550903a46332adc04d691a3cb9
show more ...
|
#
0af74a5e |
| 08-Apr-2021 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Update clang-format
Update to the latest OpenBMC clang-format.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I54010d3c756af4c85786285644038d449730612b
|
#
3fc6df48 |
| 08-Apr-2021 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
c++17: drop experimental::filesystem
Use the real filesystem library, and drop support for building with experimental under c++14.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I
c++17: drop experimental::filesystem
Use the real filesystem library, and drop support for building with experimental under c++14.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I730c0d6dce53b5e0aa0867cddb7f325cdb9b45fc
show more ...
|
#
2f8e276c |
| 11-Feb-2021 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Move emit_object_added to respective dump entry classes
The emit_object_added was added in the base entry class so all information was not present in the InterfaceAdded. In the below example the VSP
Move emit_object_added to respective dump entry classes
The emit_object_added was added in the base entry class so all information was not present in the InterfaceAdded. In the below example the VSP String and password are null To fix this moved emit_object_added to derived classes so InterfaceAdded signal will come only after the creation of complete object. Without fix: Sender=:1.41 Path=/xyz/openbmc_project/dump Interface=org.freedesktop.DBus.ObjectManager Member=InterfacesAdded UniqueName=:1.41 MESSAGE "oa{sa{sv}}" { OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1"; ARRAY "{sa{sv}}" { DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Peer"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Introspectable"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Properties"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Time.EpochTime"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Elapsed"; VARIANT "t" { UINT64 0; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Object.Delete"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Dump.Entry"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Size"; VARIANT "t" { UINT64 0; }; }; DICT_ENTRY "sv" { STRING "Offloaded"; VARIANT "b" { BOOLEAN false; }; }; DICT_ENTRY "sv" { STRING "OffloadUri"; VARIANT "s" { STRING ""; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Common.Progress"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Status"; VARIANT "s" { STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress"; }; }; DICT_ENTRY "sv" { STRING "StartTime"; VARIANT "t" { UINT64 1612968832; }; }; DICT_ENTRY "sv" { STRING "CompletedTime"; VARIANT "t" { UINT64 0; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "com.ibm.Dump.Entry.Resource"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "SourceDumpId"; VARIANT "u" { UINT32 0; }; }; DICT_ENTRY "sv" { STRING "VSPString"; VARIANT "s" { STRING ""; }; }; DICT_ENTRY "sv" { STRING "Password"; VARIANT "s" { STRING ""; }; }; }; }; }; }; With Fix: Type=signal Endian=l Flags=1 Version=1 Cookie=68 Sender=:1.286 Path=/xyz/openbmc_project/dump Interface=org.freedesktop.DBus.ObjectManager Member=InterfacesAdded UniqueName=:1.286 MESSAGE "oa{sa{sv}}" { OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/4"; ARRAY "{sa{sv}}" { DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Peer"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Introspectable"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "org.freedesktop.DBus.Properties"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Time.EpochTime"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Elapsed"; VARIANT "t" { UINT64 0; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Object.Delete"; ARRAY "{sv}" { }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Dump.Entry"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Size"; VARIANT "t" { UINT64 0; }; }; DICT_ENTRY "sv" { STRING "Offloaded"; VARIANT "b" { BOOLEAN false; }; }; DICT_ENTRY "sv" { STRING "OffloadUri"; VARIANT "s" { STRING ""; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "xyz.openbmc_project.Common.Progress"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "Status"; VARIANT "s" { STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress"; }; }; DICT_ENTRY "sv" { STRING "StartTime"; VARIANT "t" { UINT64 1612972013; }; }; DICT_ENTRY "sv" { STRING "CompletedTime"; VARIANT "t" { UINT64 0; }; }; }; }; DICT_ENTRY "sa{sv}" { STRING "com.ibm.Dump.Entry.Resource"; ARRAY "{sv}" { DICT_ENTRY "sv" { STRING "SourceDumpId"; VARIANT "u" { UINT32 4294967295; }; }; DICT_ENTRY "sv" { STRING "VSPString"; VARIANT "s" { STRING "vsp"; }; }; DICT_ENTRY "sv" { STRING "Password"; VARIANT "s" { STRING "pass0"; }; }; }; }; }; };
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I7c5a42bf1df9b38ad4cd086571c34dbef62da1b4
show more ...
|
#
a6ab806d |
| 29-Oct-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Progress tracking support for dump entries.
A new attribute status is added which indicates the status of the dump creation. The user requested dump entries will be created with InProgress and updat
Progress tracking support for dump entries.
A new attribute status is added which indicates the status of the dump creation. The user requested dump entries will be created with InProgress and updated to Completed once the dump creation is completed
Test: Request user initiated BMC and system dump and make sure the progress is changing and the dump details are updated correctly
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I68e25c865765dff97913af00bf89c8c3a4b65d43
show more ...
|
#
69e6152f |
| 04-Feb-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add call to request to offload dump
Add call through pldm to request offloading the dump from host memory.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I14fd7fdbab7822
Add call to request to offload dump
Add call through pldm to request offloading the dump from host memory.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I14fd7fdbab78222043cab8a98edd996fd01669c9
show more ...
|
#
f140f665 |
| 30-Jan-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add system dump entry.
Add support for system dump entry by implementing sdbusplus::xyz::openbmc_project::Dump::Entry::server::System
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Add system dump entry.
Add support for system dump entry by implementing sdbusplus::xyz::openbmc_project::Dump::Entry::server::System
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I9d16dab0e383651c906a21a2facefdb6482df12f
show more ...
|
#
4a98e8fe |
| 29-Jan-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Update dump manager and entry to have multiple types
Created a base dump entry, who ever implementing a new dump type need to inherit from the base dump entry.
Signed-off-by: Dhruvaraj Subhashchand
Update dump manager and entry to have multiple types
Created a base dump entry, who ever implementing a new dump type need to inherit from the base dump entry.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: Ie85d393f75ec697a7b02b84d131a4a8c0116c3e7
show more ...
|
#
cb65ffce |
| 16-Oct-2018 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Enable clang code format
Change-Id: Ib640ef7cea99ff505965182ec9900a2d53a8986e Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
#
a320c7ca |
| 14-Jun-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Implementation of create interface.
Both the external and internal Dump managers define "Create" interfaces. This commit implements these.
Change-Id: If857ec6ea7267fd72e9b420e6b44fa68b6abab66 Signe
Implementation of create interface.
Both the external and internal Dump managers define "Create" interfaces. This commit implements these.
Change-Id: If857ec6ea7267fd72e9b420e6b44fa68b6abab66 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
#
224882b0 |
| 04-May-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Initial commit for Dump.
Added initial version of Dump infrastructre code.
Change-Id: Icd9bc779035d12d2dabd6f49d0d04e9aa060d6c1 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|