diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2022-04-08 16:54:38 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-04-14 20:14:19 +0300 |
commit | ce928aca31ddca02435faeb06887ad56cc5217d0 (patch) | |
tree | b803a65b61305646b2b6e05b9e90664fe2ec34f7 /meta-ibm/recipes-phosphor | |
parent | e103db6680b25001007bbd85749f5570a97054d8 (diff) | |
download | openbmc-ce928aca31ddca02435faeb06887ad56cc5217d0.tar.xz |
dump: move dump plugins to repository but install from recipe.
1) Move ibm specific plugins from recipe to tools/dreport.d/ibm.d/plugins.d
in the repository
2) Move openpower specific plugins from recipe to
tools/dreport/opepower.d/plugins.d in the repository.
4) Modified to install the plugins from the machine specific
plugin folder from the repository
Reference links
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-debug-collector/+/52852/
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-debug-collector/+/52479
Includes:
phosphor-debug-collector: srcrev bump 02634e5531..124d31f09c
Marri Devender Rao (3):
openpower:dreport: add guarded resolved and ephemeral records to BMC dump
ibm:dreport add vpd persistent data to BMC dump
dreport: Fix network and timedate plugin failures during BMC dump generation
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I0bd350b9b564c4e98a6765902de76274f90500e4
Diffstat (limited to 'meta-ibm/recipes-phosphor')
3 files changed, 8 insertions, 71 deletions
diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall deleted file mode 100644 index 3054f237c8..0000000000 --- a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# config: 2 20 -# @brief: Get the IBM specific elog objects -# - -. $DREPORT_INCLUDE/functions - -desc="IBM elog" - -entries=$(busctl --list --no-pager tree \ - com.ibm.Logging | grep \ - '/xyz/openbmc_project/logging/entry/') - -#check for elog entries. -if [ -z "$entries" ]; then - log_info "No $desc entries" - exit 0 -fi - -command="busctl call --verbose --no-pager \ - com.ibm.Logging \ - /xyz/openbmc_project/logging \ - org.freedesktop.DBus.ObjectManager \ - GetManagedObjects" - -file_name="ibm_elogall.log" - -add_cmd_output "$command" "$file_name" "$desc" diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/pels b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/pels deleted file mode 100644 index 2ad4ab0eaf..0000000000 --- a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/pels +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# -# config: 23 20 -# -# 23 = User dump(2), elog dump(3) -# 20 = priority - -# @brief: Collect the PEL files - -. $DREPORT_INCLUDE/functions - -dir="/var/lib/phosphor-logging/extensions/pels/logs" -desc="PEL Files" -add_copy_file "$dir" "$desc" diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend index ec831eb5f1..d25adb8cd8 100644 --- a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend +++ b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend @@ -6,25 +6,18 @@ PACKAGECONFIG:append:witherspoon-tacoma = " host-dump-transport-pldm" PACKAGECONFIG:append:p10bmc = " openpower-dumps-extension" PACKAGECONFIG:append:witherspoon-tacoma = " openpower-dumps-extension" -SRC_URI += "file://plugins.d/ibm_elogall" -SRC_URI += "file://plugins.d/pels" - install_ibm_plugins() { - - install -m 0755 ${WORKDIR}/plugins.d/ibm_elogall ${D}${dreport_plugin_dir} - install -m 0755 ${WORKDIR}/plugins.d/pels ${D}${dreport_plugin_dir} - + install ${S}/tools/dreport.d/ibm.d/plugins.d/* ${D}${dreport_plugin_dir}/ } #Link in the plugins so dreport run them at the appropriate time python link_ibm_plugins() { - - workdir = d.getVar('WORKDIR', True) - script = os.path.join(workdir, 'plugins.d', 'ibm_elogall') - install_dreport_user_script(script, d) - - script = os.path.join(workdir, 'plugins.d', 'pels') - install_dreport_user_script(script, d) + source = d.getVar('S', True) + source_path = os.path.join(source, "tools", "dreport.d", "ibm.d", "plugins.d") + op_plugins = os.listdir(source_path) + for op_plugin in op_plugins: + op_plugin_name = os.path.join(source_path, op_plugin) + install_dreport_user_script(op_plugin_name, d) } #Install dump header script from dreport/ibm.d to dreport/include.d @@ -33,20 +26,7 @@ install_dreport_header() { install -m 0755 ${S}/tools/dreport.d/ibm.d/gendumpheader ${D}${dreport_include_dir}/ } -#Install ibm bad vpd script from dreport/ibm.d to dreport/plugins.d -install_ibm_bad_vpd() { - install -d ${D}${dreport_plugin_dir} - install -m 0755 ${S}/tools/dreport.d/ibm.d/badvpd ${D}${dreport_plugin_dir} -} - -#Link in the plugins so dreport run them at the appropriate time based on the plugin type -python link_ibm_bad_vpd() { - sourcedir = d.getVar('S', True) - script = os.path.join(sourcedir, "tools", "dreport.d", "ibm.d", "badvpd") - install_dreport_user_script(script, d) -} - IBM_INSTALL_POSTFUNCS = "install_ibm_plugins link_ibm_plugins" -IBM_INSTALL_POSTFUNCS:p10bmc += "install_dreport_header install_ibm_bad_vpd link_ibm_bad_vpd" +IBM_INSTALL_POSTFUNCS:p10bmc += "install_dreport_header" do_install[postfuncs] += "${IBM_INSTALL_POSTFUNCS}" |