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 | |
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
6 files changed, 17 insertions, 96 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}" diff --git a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard deleted file mode 100644 index cdd461fec9..0000000000 --- a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# config: 2 40 -# @brief: Collect GUARD record information. -# - -. $DREPORT_INCLUDE/functions - -desc="GUARD Records" -file_name="/var/lib/phosphor-software-manager/pnor/prsv/GUARD" - -# Check file is present and not empty. -if [ ! -s "$file_name" ]; then - log_info "No $desc" - exit 0 -fi - -add_copy_file "$file_name" "$desc" diff --git a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend index 00b9eadfc6..3f505c3f67 100644 --- a/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend +++ b/meta-openpower/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend @@ -1,15 +1,17 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://plugins.d/guard" install_openpower_plugins() { - install -m 0755 ${WORKDIR}/plugins.d/guard ${D}${dreport_plugin_dir} + install ${S}/tools/dreport.d/openpower.d/plugins.d/* ${D}${dreport_plugin_dir} } -#Link in the plugins so dreport run them at the appropriate time +#Link the plugins so that dreport can run them based on dump type python link_openpower_plugins() { - workdir = d.getVar('WORKDIR', True) - script = os.path.join(workdir, 'plugins.d', 'guard') - install_dreport_user_script(script, d) + source = d.getVar('S', True) + source_path = os.path.join(source, "tools", "dreport.d", "openpower.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) } DEBUG_COLLECTOR_INSTALL_POSTFUNCS ?= "" diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc index 18c2e9f064..e97251eb20 100644 --- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc +++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-debug-collector" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-debug-collector;branch=master;protocol=https" -SRCREV = "02634e5531fd0ea2abefe7d277732847b8d6c86e" +SRCREV = "124d31f09cbb0eebd0f14aceade5c2fd290520fe" |