OpenPOWER: Add support for OpenPOWER dump policy
Add support for system dump policy, here system dump
referes to all OpenPOWER dumps, since all dumps from
host subsystems on OpenPOWER systems are known as system dumps.
Currently supported policy is dump enable. The dump will be
created only if the policy is enabled, if the dump is not
enabled, a dump disabled error will be returned.
If the settings service is not available, considering as
dump is enabled.
Tests:
- Create a dump with policy enabled
busctl --verbose call xyz.openbmc_project.Settings /xyz/openbmc_project/dump/system_dump_policy org.freedesktop.DBus.Properties Get ss "xyz.openbmc_project.Object.Enable" "Enabled"
MESSAGE "v" {
VARIANT "b" {
BOOLEAN true;
};
};
busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/resource xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" "com.ibm.Dump.Create.CreateParameters.Password" s "password"
MESSAGE "o" {
OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1";
};
Result: Dump created
- Create a dump with policy disabled
busctl --verbose call xyz.openbmc_project.Settings /xyz/openbmc_project/dump/system_dump_policy org.freedesktop.DBus.Properties Get ss "xyz.openbmc_project.Object.Enable" "Enabled"
MESSAGE "v" {
VARIANT "b" {
BOOLEAN false;
};
};
busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/resource xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" "com.ibm.Dump.Create.CreateParameters.Password" s "password"
Call failed: Dump is disabled on this system.
Result: Dump is not allowed
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I5dc609b1f4fd0f36df8520f8a75c18a4cd3d7c4c
diff --git a/dump-extensions/openpower-dumps/meson.build b/dump-extensions/openpower-dumps/meson.build
index abb9904..c367421 100644
--- a/dump-extensions/openpower-dumps/meson.build
+++ b/dump-extensions/openpower-dumps/meson.build
@@ -28,5 +28,6 @@
'dump-extensions/openpower-dumps/dump_manager_system.cpp',
'dump-extensions/openpower-dumps/system_dump_entry.cpp',
'dump-extensions/openpower-dumps/dump_manager_resource.cpp',
- 'dump-extensions/openpower-dumps/resource_dump_entry.cpp'
+ 'dump-extensions/openpower-dumps/resource_dump_entry.cpp',
+ 'dump-extensions/openpower-dumps/op_dump_util.cpp'
]