!107 fix ai_block_io root cause bug

From: @hyz2024 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
This commit is contained in:
openeuler-ci-bot 2024-10-16 06:08:07 +00:00 committed by Gitee
commit 9373a29382
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 41 additions and 1 deletions

View File

@ -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 Causedisk 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 Causeio 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 Causehigh 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

View File

@ -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 <heyouzhi@huawei.com> - 1.0.2-40
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix ai_block_io root cause bug
* Tue Oct 15 2024 gaoruoshu <gaoruoshu@huawei.com> - 1.0.2-39
- Type:bugfix
- CVE:NA