From 64e5cb5400332cf276d84bbff1e2942d3c8930f5 Mon Sep 17 00:00:00 2001 From: "Evgeny Alekseev (IBS Group)" Date: Mon, 17 Oct 2022 17:43:03 +0300 Subject: IBS:Filter SMTP errors from sending over SMTP --- ...xclude-SMTP-errors-from-sending-over-SMTP.patch | 32 ++++++++++++++++++++++ .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 28 +++++++++---------- 2 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch new file mode 100644 index 0000000000..ce77c2109a --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch @@ -0,0 +1,32 @@ +From 0e3da8208d0a5b478b6c8f9880efebe2269539b3 Mon Sep 17 00:00:00 2001 +From: "Evgeny Alekseev (IBS Group)" +Date: Mon, 17 Oct 2022 17:30:39 +0300 +Subject: [PATCH] Exclude SMTP errors from sending over SMTP + +--- + src/redfish2phosphor-logs.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/redfish2phosphor-logs.cpp b/src/redfish2phosphor-logs.cpp +index 8c2aa6d9..4c62f753 100644 +--- a/src/redfish2phosphor-logs.cpp ++++ b/src/redfish2phosphor-logs.cpp +@@ -25,6 +25,7 @@ static constexpr char ARG_DELIMITER = '$'; + static constexpr auto ARG_COUNT = 4; + + static constexpr auto excluded_messages = std::array{"SELEntryAdded"}; ++static constexpr auto smtp_excluded_messages = std::array{"SELEntryAdded", "SMTPError"}; + + enum class level + { +@@ -216,8 +217,8 @@ int main(int argc, char* argv[]) + } + try + { +- if (std::find(excluded_messages.begin(), excluded_messages.end(), +- std::get<0>(*message)) == excluded_messages.end()) ++ if (std::find(smtp_excluded_messages.begin(), smtp_excluded_messages.end(), ++ std::get<0>(*message)) == smtp_excluded_messages.end()) + { + dbusCallMethodNoReturn( + getBus(), "xyz.openbmc_project.SMTP"s, diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index be8dd34706..e664a0b887 100644 --- a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -2,20 +2,20 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRCREV = "3e7ab70817a6e49684c7c01ec0f2d67630f36559" -SRC_URI += "\ - file://0001-Enable-vm-nbdproxy-option.patch \ - file://0002-Add-http-ftp-nfs-protocols.patch \ - file://0003-IBS-Add-redfish2phosphor-logs.patch \ - file://0004-Add-Sensor-Warning-Threshold-Edit.patch \ - file://0005-IBS-bmcweb-evt-registry-add-BMCTimeUpdatedViaNTP.patch \ - file://0006-Add-critical-thresholds-to-redfish.patch \ - file://0007-Add-additional-logs-about-time-sync.patch \ - file://0008-Added-additional-log-about-NTP-sync-status.patch \ - file://0009-Added-check-user-priv-before-creating-KVM-and-SOL.patch \ - file://0010-Support-setting-IPMI-and-SSH-port-via-redfish.patch \ - file://0011-redfish2phosphor-add-exclude-list.patch \ - file://0012-Transfer-logs-to-SMTP.patch \ - " +SRC_URI += "file://0001-Enable-vm-nbdproxy-option.patch \ + file://0002-Add-http-ftp-nfs-protocols.patch \ + file://0003-IBS-Add-redfish2phosphor-logs.patch \ + file://0004-Add-Sensor-Warning-Threshold-Edit.patch \ + file://0005-IBS-bmcweb-evt-registry-add-BMCTimeUpdatedViaNTP.patch \ + file://0006-Add-critical-thresholds-to-redfish.patch \ + file://0007-Add-additional-logs-about-time-sync.patch \ + file://0008-Added-additional-log-about-NTP-sync-status.patch \ + file://0009-Added-check-user-priv-before-creating-KVM-and-SOL.patch \ + file://0010-Support-setting-IPMI-and-SSH-port-via-redfish.patch \ + file://0011-redfish2phosphor-add-exclude-list.patch \ + file://0012-Transfer-logs-to-SMTP.patch \ + file://0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch \ + " EXTRA_OEMESON += "\ -Dredfish-cpu-log=enabled \ -- cgit v1.2.3