From b3ac391178aa002d3ce9e7f28d88d44acbbb87df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com> Date: Wed, 16 Oct 2024 03:53:52 +0000 Subject: [PATCH] fix ai_block_io root cause bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 贺有志 <1037617413@qq.com> fix ai_block_io root cause bug Signed-off-by: 贺有志 <1037617413@qq.com> --- fix-ai_block_io-root-cause-bug.patch | 33 ++++++++++++++++++++++++++++ sysSentry.spec | 9 +++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 fix-ai_block_io-root-cause-bug.patch diff --git a/fix-ai_block_io-root-cause-bug.patch b/fix-ai_block_io-root-cause-bug.patch new file mode 100644 index 0000000..f6de787 --- /dev/null +++ b/fix-ai_block_io-root-cause-bug.patch @@ -0,0 +1,33 @@ +From ac9ce326dee20edde2451946e34ea9a13bd8c338 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com> +Date: Wed, 16 Oct 2024 11:50:46 +0800 +Subject: [PATCH] fix ai_block_io root cause bug + +--- + src/python/sentryPlugins/ai_block_io/detector.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/python/sentryPlugins/ai_block_io/detector.py b/src/python/sentryPlugins/ai_block_io/detector.py +index 5b21714..ed8b64a 100644 +--- a/src/python/sentryPlugins/ai_block_io/detector.py ++++ b/src/python/sentryPlugins/ai_block_io/detector.py +@@ -101,12 +101,12 @@ class DiskDetector: + if len(diagnosis_info["bio"]) == 0: + return False, None, None, None + elif len(diagnosis_info["rq_driver"]) != 0: +- root_cause = "[Root Cause:disk slow]" ++ root_cause = "[Root Cause: disk slow]" + elif len(diagnosis_info["io_stage"]) != 0: +- stage = diagnosis_info["io_stage"][0][1].get_stage_name() +- root_cause = f"[Root Cause:io stage slow, stage: {stage}]" ++ stage = diagnosis_info["io_stage"][0][1].stage_name ++ root_cause = f"[Root Cause: io stage slow, stage: {stage}]" + if root_cause is None: +- root_cause = "[Root Cause:high io pressure]" ++ root_cause = "[Root Cause: high io pressure]" + return True, diagnosis_info["bio"][0][0], diagnosis_info["bio"][0][1], root_cause + + def __repr__(self): +-- +2.23.0 + diff --git a/sysSentry.spec b/sysSentry.spec index 848aec6..124a52e 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 39 +Release: 40 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -58,6 +58,7 @@ Patch45: modify-abnormal-stack-when-the-disk-field-is-not-con.patch Patch46: ai_block_io-fix-some-bugs.patch Patch47: refactor-config.py-and-bugfix-uncorrect-slow-io-repo.patch Patch48: get_io_data-failed-wont-stop-avg_block_io-and-del-di.patch +Patch49: fix-ai_block_io-root-cause-bug.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -320,6 +321,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin* %changelog +* Wed Oct 16 2024 heyouzhi - 1.0.2-40 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix ai_block_io root cause bug + * Tue Oct 15 2024 gaoruoshu - 1.0.2-39 - Type:bugfix - CVE:NA -- Gitee