Compare commits

...

No commits in common. "c9s" and "c8" have entirely different histories.
c9s ... c8

16 changed files with 123 additions and 168 deletions

19
.gitignore vendored
View File

@ -1,18 +1 @@
/ppc64-diag-2.4.2.tar.gz SOURCES/ppc64-diag-2.7.9.tar.gz
/ppc64-diag-2.4.3.tar.gz
/ppc64-diag-2.6.1.tar.gz
/ppc64-diag-2.6.2.tar.gz
/ppc64-diag-2.6.3.tar.gz
/ppc64-diag-2.6.4.tar.gz
/ppc64-diag-2.6.5.tar.gz
/ppc64-diag-2.6.6.tar.gz
/ppc64-diag-2.6.7.tar.gz
/ppc64-diag-2.6.10.tar.gz
/ppc64-diag-2.7.0.tar.gz
/ppc64-diag-2.7.1.tar.gz
/ppc64-diag-2.7.4.tar.gz
/ppc64-diag-2.7.5.tar.gz
/ppc64-diag-2.7.6.tar.gz
/ppc64-diag-2.7.7.tar.gz
/ppc64-diag-2.7.8.tar.gz
/ppc64-diag-2.7.9.tar.gz

View File

@ -0,0 +1,71 @@
commit db0c6d7974d7f8909878384d77ec02457759d6df
Author: Nilay Shroff <nilay@linux.ibm.com>
Date: Tue Jan 16 13:55:03 2024 +0530
diags/diag_nvme: call_home command fails on nvmf drive
The diag_nvme command needs to retrieve the VPD log page from NVMe for
filling in the product data while generating the call-home event.
However, call-home feature is supported for directly attached NVMe
module. In the current diag_nvme implementation, if user doesn't
provide NVMe device name for diagnostics then it(diag_nvme) loops
through each NVMe moudle (directly connected to the system/LPAR as
well as discovered over fabrics) and attempt retrieving the SMART log
page as well as VPD page. Unfortunately, diag_nvme fails to retrieve
the VPD page for NVMe connected over fabrics and that causes the
diag_nvme to print "not-so-nice" failure messages on console.
Henec fixed the diag_nvme code so that for call-home event reporting,
it skips the NVMe which is connected over fabrics and prints a
"nice-message" informing the user that it's skipping diagnosting for
NVMe module connected over fabrics. In a nutshell, with this fix now
diag_nvme would only diagnose the NVMe module which is directtly
attached (over PCIe) to the system.
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
diff --git a/diags/diag_nvme.c b/diags/diag_nvme.c
index c1c0a20..e86786c 100644
--- a/diags/diag_nvme.c
+++ b/diags/diag_nvme.c
@@ -375,9 +375,40 @@ static int diagnose_nvme(char *device_name, struct notify *notify, char *file_pa
char endurance_s[sizeof(vpd.endurance) + 1], capacity_s[sizeof(vpd.capacity)+1];
uint64_t event_id;
uint8_t severity;
+ FILE *fp;
+ char tr_file_path[PATH_MAX];
uint32_t raw_data_len = 0;
unsigned char *raw_data = NULL;
+ /*
+ * Skip diag test if NVMe is connected over fabric
+ */
+ snprintf(tr_file_path, sizeof(tr_file_path),
+ NVME_SYS_PATH"/%s/%s", device_name, "transport");
+ fp = fopen(tr_file_path, "r");
+ if (fp) {
+ char buf[12];
+ int n = fread(buf, 1, sizeof(buf), fp);
+
+ if (n) {
+ /*
+ * If NVMe transport is anything but pcie then skip the diag test
+ */
+ if (strncmp(buf, "pcie", 4) != 0) {
+ fprintf(stdout, "Skipping diagnostics for nvmf : %s\n",
+ device_name);
+ fclose(fp);
+ return 0;
+ }
+ }
+ fclose(fp);
+ } else {
+ fprintf(stderr, "Skipping diagnostics for %s:\n"
+ "Unable to find the nvme transport type\n",
+ device_name);
+ return -1;
+ }
+
tmp_rc = regex_controller(controller_name, device_name);
if (tmp_rc != 0)
return -1;

View File

@ -1,10 +1,15 @@
# BZ#860040:
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl
Name: ppc64-diag Name: ppc64-diag
Version: 2.7.9 Version: 2.7.9
Release: 4%{?dist} Release: 3%{?dist}
Summary: PowerLinux Platform Diagnostics Summary: PowerLinux Platform Diagnostics
URL: https://github.com/power-ras/%{name} URL: https://github.com/power-ras/ppc64-diag
Group: System Environment/Base
License: GPLv2 License: GPLv2
ExclusiveArch: ppc %{power64} ExclusiveArch: ppc %{power64}
BuildRequires: make BuildRequires: make
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libservicelog-devel BuildRequires: libservicelog-devel
@ -37,10 +42,12 @@ Patch0: ppc64-diag-2.7.9-fedora.patch
# upstream fixes # upstream fixes
# rtas_errd: Handle multiple platform dumps # rtas_errd: Handle multiple platform dumps
Patch10: ppc64-diag-2.7.9-handle_multiple_platform_dumps.patch Patch10: ppc64-diag-2.7.9-handle_multiple_platform_dumps.patch
# ppc64-diag/lp_diag: Enable light path diagnostics for RTAS events
Patch11: ppc64-diag-2.7.9-moving-trim_trail_space-function.patch Patch11: ppc64-diag-2.7.9-moving-trim_trail_space-function.patch
Patch12: ppc64-diag-2.7.9-utilize-trim_trail_space-in-event_fru_callout.patch Patch12: ppc64-diag-2.7.9-utilize-trim_trail_space-in-event_fru_callout.patch
Patch13: ppc64-diag-2.7.9-enable-light-path-diagnostics-for-RTAS-events.patch Patch13: ppc64-diag-2.7.9-enable-light-path-diagnostics-for-RTAS-events.patch
Patch14: ppc64-diag-2.7.9-diag_encl-man-and-help-page.patch # call_home command "diag_nvme" fails on nvmf drive(nvmf/lpfc/Power10)
Patch14: ppc64-diag-2.7.9-call_home-fail-on-nvmf-device
%description %description
This package contains various diagnostic tools for PowerLinux. This package contains various diagnostic tools for PowerLinux.
@ -54,8 +61,7 @@ administrators or connected service frameworks.
%package rtas %package rtas
Summary: rtas_errd daemon Summary: rtas_errd daemon
# PCI hotplug support on PowerKVM guest depends on below powerpc-utils version. Requires: powerpc-utils-core >= 1.3.6-6
Requires: powerpc-utils-core >= 1.3.7-5
%description rtas %description rtas
This package contains only rtas_errd daemon. This package contains only rtas_errd daemon.
@ -65,8 +71,8 @@ This package contains only rtas_errd daemon.
%build %build
./autogen.sh ./autogen.sh
CXXFLAGS="-std=gnu++14 %{build_cflags}" %configure %configure
LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="-std=gnu++14 %{build_cflags}" make %{?_smp_mflags} V=1 LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1
%install %install
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
@ -77,6 +83,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ses_pages mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ses_pages
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/dump mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/dump
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/opal-elog mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/opal-elog
ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault
install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT/%{_mandir}/man8/ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT/%{_mandir}/man8/
@ -135,18 +142,18 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD
%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1
%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1 %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1
if [ "$1" = "1" ]; then # first install if [ "$1" = "1" ]; then # first install
systemctl -q enable opal_errd.service >/dev/null systemctl -q enable opal_errd.service >/dev/null 2>&1
systemctl start opal_errd.service >/dev/null systemctl start opal_errd.service >/dev/null 2>&1
elif [ "$1" = "2" ]; then # upgrade elif [ "$1" = "2" ]; then # upgrade
systemctl restart opal_errd.service >/dev/null systemctl restart opal_errd.service >/dev/null 2>&1
systemctl daemon-reload > /dev/null 2>&1 systemctl daemon-reload > /dev/null 2>&1
fi fi
%preun %preun
# Pre-uninstall script ------------------------------------------------- # Pre-uninstall script -------------------------------------------------
if [ "$1" = "0" ]; then # last uninstall if [ "$1" = "0" ]; then # last uninstall
systemctl stop opal_errd.service >/dev/null systemctl stop opal_errd.service >/dev/null 2>&1
systemctl -q disable opal_errd.service systemctl -q disable opal_errd.service >/dev/null 2>&1
%{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null
%{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null
systemctl daemon-reload > /dev/null 2>&1 systemctl daemon-reload > /dev/null 2>&1
@ -155,11 +162,10 @@ fi
%triggerin -- librtas %triggerin -- librtas
# trigger on librtas upgrades ------------------------------------------ # trigger on librtas upgrades ------------------------------------------
if [ "$2" = "2" ]; then if [ "$2" = "2" ]; then
systemctl restart opal_errd.service >/dev/null systemctl restart opal_errd.service >/dev/null 2>&1
systemctl restart rtas_errd.service >/dev/null systemctl restart rtas_errd.service >/dev/null 2>&1
fi fi
%post rtas %post rtas
if [ "$1" = "1" ]; then # first install if [ "$1" = "1" ]; then # first install
systemctl -q enable rtas_errd.service >/dev/null systemctl -q enable rtas_errd.service >/dev/null
@ -177,74 +183,48 @@ if [ "$1" = "0" ]; then # last uninstall
fi fi
%changelog %changelog
* Sun Oct 27 2024 Than Ngo <than@redhat.com> - 2.7.9-4 * Wed Jan 31 2024 Than Ngo <than@redhat.com> - 2.7.9-3
- Resolves: RHEL-55399, diag_encl man and help page are not in sync - call_home command "diag_nvme" fails on nvmf drive
Resolves: RHEL-23437
* Sun Dec 10 2023 Than Ngo <than@redhat.com> - 2.7.9-3 * Sun Dec 10 2023 Than Ngo <than@redhat.com> - 2.7.9-2
- Enable light path diagnostics for RTAS events - Enable light path diagnostics for RTAS events
Resolves: RHEL-11478 - Handle multiple platform dumps
Resolves: RHEL-11454
* Thu Jul 20 2023 Than Ngo <than@redhat.com> - 2.7.9-2 * Wed Oct 19 2022 Than Ngo <than@redhat.com> - 2.7.9-1
- Resolves: #2177948, handle multiple platform dumps - Resolves: #2114591, rebase to 2.7.9
* Tue Oct 18 2022 Than Ngo <than@redhat.com> - 2.7.9-1 * Fri May 13 2022 Than Ngo <than@redhat.com> - 2.7.8-1
- Resolves: #2110128, add NVMe Call Home support - Resolves: #2051313, rebase to 2.7.8
* Fri May 06 2022 Than Ngo <than@redhat.com> - 2.7.8-1
- Resolves: #2051286, rebase to 2.7.8
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.7-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon May 17 2021 Than Ngo <than@redhat.com> - 2.7.7-1 * Mon May 17 2021 Than Ngo <than@redhat.com> - 2.7.7-1
- Resolves: #1869567, rebase to 2.7.7 - Resolves: #1779206, rebase to 2.7.7
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.6-10 * Thu Mar 26 2020 Than Ngo <than@redhat.com> - 2.7.6-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Resolves: #1814335, create rtas subpackage to avoid the perl dependency
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-9 * Thu Nov 07 2019 Than Ngo <than@redhat.com> - 2.7.6-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Resolves: #1725200, rebase to 2.7.6
* Tue Oct 27 2020 Jeff Law <law@redhat.com> - 2.7.6-8 * Wed Jun 19 2019 Than Ngo <than@redhat.com> - 2.7.5-2
- Force C++14 for configure step too - Resolves: #1721497, added /var/log/ppc64-diag and systemctl daemon-reload
* Tue Oct 27 2020 Jeff Law <law@redhat.com> - 2.7.6-7 * Tue Apr 30 2019 Than Ngo <than@redhat.com> - 2.7.5-1
- Force C++14 mode as this code is not C++17 ready - Resolves: #1664093, update to latest upstream 2.7.5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-6 * Mon Dec 10 2018 Than Ngo <than@redhat.com> - 2.7.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - install missing man pages
* Mon Mar 30 2020 Than Ngo <than@redhat.com> - 2.7.6-5 * Mon Dec 10 2018 Than Ngo <than@redhat.com> - 2.7.4-3
- add requirement on powerpc-utils in main package - create diag_disk path part of installation
- diags: Increase buffer length size to read complete system vpd information
* Sat Mar 28 2020 Than Ngo <than@redhat.com> - 2.7.6-4 - diags: Remove timestamp from disk health log file
- create rtas subpackage to avoid the perl dependency - diags: Create diag_disk log directory manually if not present
Resolves: #1657757
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 02 2019 Than Ngo <than@redhat.com> - 2.7.6-2
- Update Url and Source
* Wed Nov 27 2019 Than Ngo <than@redhat.com> - 2.7.6-1
- rebase to 2.7.6
- update Url
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Apr 25 2019 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2.7.5-1
- Update to latest upstream 2.7.5
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu May 10 2018 Dan Horák <dan[at]danny.cz> - 2.7.4-2 * Thu May 10 2018 Dan Horák <dan[at]danny.cz> - 2.7.4-2
- fix condition for rtas_errd service (#1575638) - fix conditition for rtas_errd service (#1575638)
* Fri Mar 09 2018 Than Ngo <than@redhat.com> - 2.7.4-1 * Fri Mar 09 2018 Than Ngo <than@redhat.com> - 2.7.4-1
- update to latest upstream 2.7.4 - update to latest upstream 2.7.4

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

View File

@ -1,72 +0,0 @@
commit 565035cf98e97c7adda523221e109c676daf3430
Author: Barnali Guha Thakurata <barnali@linux.ibm.com>
Date: Mon Jan 8 20:16:19 2024 +0530
diag_encl help output update
This patch changes "scsi_enclosure" in the help output of diag_encl to
"sgn ..." so that it matches with the naming convention in the
manual page
Before patch:
diags/diag_encl --help
Usage: diags/diag_encl [-h] [-V] [...] [<scsi_enclosure>]
[...]
<scsi_enclosure>: the sg device on which to operate, such
as sg7; if not specified, all such
devices will be diagnosed
man diags/man/diag_encl.8
...
SYNOPSIS
diag_encl [-s [-c][-l]] [-v] [-f <path.pg2>] [sgn ...]
diag_encl -d
diag_encl --version
diag_encl --help
...
After patch:
diags/diag_encl --help
Usage: diags/diag_encl [-h] [-V] [...] [-f <path.pg2>] [<sgn ...>]
[...]
<sgn ...>: the scsi device on which to operate, such
as sg7; if not specified, all such
devices will be diagnosed
man diags/man/diag_encl.8
...
SYNOPSIS
diag_encl [-s [-c][-l]] [-v] [-f <path.pg2>] [sgn ...]
diag_encl -d
diag_encl --version
diag_encl --help
...
Signed-off-by: Barnali Guha Thakurata <barnali@linux.ibm.com>
diff --git a/diags/diag_encl.c b/diags/diag_encl.c
index 449b097..e0d86ce 100644
--- a/diags/diag_encl.c
+++ b/diags/diag_encl.c
@@ -75,8 +75,7 @@ static struct {
*/
static void
print_usage(const char *name) {
- printf("Usage: %s [-h] [-V] [-s [-c][-l]] [-v] [-f <path.pg2>]"
- " [<scsi_enclosure>]\n"
+ printf("Usage: %s [-h] [-V] [-s [-c][-l]] [-v] [-f <path.pg2>] [<sgn ...>]\n"
"\n\t-h: print this help message\n"
"\t-s: generate serviceable events for any failures and\n"
"\t write events to the servicelog\n"
@@ -87,7 +86,7 @@ print_usage(const char *name) {
"\t-V: print the version of the command and exit\n"
"\t-f: for testing, read SES data from path.pg2 and VPD\n"
"\t from path.vpd\n"
- "\t<scsi_enclosure>: the sg device on which to operate, such\n"
+ "\t<sgn ...>: the scsi device on which to operate, such\n"
"\t as sg7; if not specified, all such\n"
"\t devices will be diagnosed\n", name);
}

View File

@ -1 +0,0 @@
SHA512 (ppc64-diag-2.7.9.tar.gz) = b6756c17e67e876ad3a945d05dbd2c2523cbf121c4aa658a4edaf33775c8165ff26a252bdf812600e2d47ae69cd68f6e22c0de6f2d3994856adcd3d949322673