Revision Date Author Comments
# 05ef8163 22-Nov-2022 Lei YU <yulei.sh@bytedance.com>

Correct the timing of emit_object_added

The deletion of the dump objects emits InterfacesRemoved signal, but the
interfaces removed in the signal does not contain the interfaces defined
in the base

Correct the timing of emit_object_added

The deletion of the dump objects emits InterfacesRemoved signal, but the
interfaces removed in the signal does not contain the interfaces defined
in the base class phosphor::dump::Entry:
```
xyz.openbmc_project.Common.OriginatedBy
xyz.openbmc_project.Common.Progress
xyz.openbmc_project.Dump.Entry
xyz.openbmc_project.Object.Delete
xyz.openbmc_project.Time.EpochTime
```

This results in the mapper still keeping the objects even if the object
is removed from DBus, and it becomes inconsistent between the DBus
objects and mapper.

Adjust the inheritance sequence, so that in destruction,
emit_object_removed() is called when all the interfaces are there, so
that all the interfaces could be included in the signal.

Without this change, the destructor sequence is (Taking BMCEntry as
example):
1. phosphor::dump::Entry is destructed, no signal is emitted;
2. phosphor::dump::bmc::EntryIfaces is destructed, signal is emitted,
but at this time, only the interfaces implemented by
phosphor::dump::bmc::EntryIfaces is included, which is the root cause of
the problem.

With the change, the destructor sequence is:
1. phosphor::dump::bmc::EntryIfaces is destructed, signal is emitted,
and all the interfaces are included in the signal;
2. phosphor::dump::Entry is destructed, no signal is emitted.

So all the interfaces implemented by BMCEntry is included in the
InterfacesRemoved signal, and thus the issue is fixed.

Tested: Before this change:
1. Create a dump, say /xyz/openbmc_project/dump/bmc/entry/2
2. Delete it
3. Mapper still list the above object although it does not
really exist.
With this fix, verify the above issue is fixed.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I76710fa9b8d23344cf979bd8f3bdcc331e663264

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 ...


# 16eafec0 14-Feb-2023 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

OpenPOWER: Remove duplicate OriginatedBy interface

The OriginatedBy interface is added to the base entry
class but again added to resource and system dump entries
which is causing issue while starti

OpenPOWER: Remove duplicate OriginatedBy interface

The OriginatedBy interface is added to the base entry
class but again added to resource and system dump entries
which is causing issue while starting the service.

Change-Id: I936dbccf9a7a2d26595cceea48daa4c67278c999
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

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 ...


# 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 ...


# 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.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

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 ...


# 341d683d 15-Jan-2021 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Change the the namespace of OpenPOWER dumps.

Change the namespace of OpenPOWER dumps to openpower
instead of phosphor.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm

Change the the namespace of OpenPOWER dumps.

Change the namespace of OpenPOWER dumps to openpower
instead of phosphor.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I0b99da60cb19f3cf559ce40c971b3ba6f4888238

show more ...


# 2279386b 04-Dec-2020 Ramesh Iyyar <rameshi1@in.ibm.com>

host: Added support to delete system dump

To delete host system dump using pldm oem command "FileAck" with
dump file type and dump id which is present as source dump id (which
is got

host: Added support to delete system dump

To delete host system dump using pldm oem command "FileAck" with
dump file type and dump id which is present as source dump id (which
is got from pldm after created the host system dump) in system dump entry
dbus object and also, to use pldm oem command added support to indicate
delete host system dump support is not available for other host transport
consumer and for other oem vendors who are using pldm as host transport
to get host dump.

Also, changed existing commited error i.e internal failure into not allowed
for host system dump offload to avoid bmc dump creation in dump path.

Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
Change-Id: Ib6be5b521fb3c5aa2926497bae0b03c1d9737161

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 InPr

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 ...


# 6ccb50e1 29-Oct-2020 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Return the object path for user requested dumps.

Return the object path to a dump entry for the user requested
dump. A dump entry will be created when the user request for
the dump a

Return the object path for user requested dumps.

Return the object path to a dump entry for the user requested
dump. A dump entry will be created when the user request for
the dump and that will be used for tracking the progress.
The dump details like size etc will be empty and the complete
details will be filled once the dump creation is completed.

Executed current BMC and system dump test cases on a test build
- Create BMC dump
- List All dumps
- Offload BMC dump
- Delete BMC dump
- Create manual system dump.
- Attempt to offload dump.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I89b252e2731f4f1fb924d26c7ac05999341fc691

show more ...


# 8b9b4690 24-Sep-2020 Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Make OpenPower specific dump an optional feature

Make all OpenPower dumps as optional feature and should be
enabled in the configuration. System dump is the currently
implemented exa

Make OpenPower specific dump an optional feature

Make all OpenPower dumps as optional feature and should be
enabled in the configuration. System dump is the currently
implemented example of OpenPower dump. BMC dump will be
enabled by default.

To enable
openpower-dumps-extension=enabled

Test:
Tested all existing dump operations using automated
testing.

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: If20b4711dfcf02a2a8ea23848f7409576813c832

show more ...