add separator to err info

This commit is contained in:
shixuantong 2024-09-25 11:36:51 +08:00
parent b39420373c
commit 788063f8b1
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 9eab57b95c88efc7bfc36e845664c9d35166db8f Mon Sep 17 00:00:00 2001
From: shixuantong <shixuantong1@huawei.com>
Date: Wed, 25 Sep 2024 10:38:46 +0800
Subject: [PATCH] add separator to err info
---
src/python/syssentry/cpu_sentry.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/syssentry/cpu_sentry.py b/src/python/syssentry/cpu_sentry.py
index 582d4b3..2f18d14 100644
--- a/src/python/syssentry/cpu_sentry.py
+++ b/src/python/syssentry/cpu_sentry.py
@@ -127,7 +127,7 @@ class CpuSentry:
ansi_escape = r'\x1b\[([0-9]+)(;[0-9]+)*([A-Za-z])'
error_info = re.sub(ansi_escape, '', error_info)
if len(send_error_msg) + len(error_info) < DETAILS_LOG_MSG_MAX_LEN:
- send_error_msg += error_info
+ send_error_msg += ";" + error_info
self.send_result["details"]["msg"] = send_error_msg
elif found_fault_cores_number == 0:
self.send_result["details"]["code"] = 0
--
2.27.0

View File

@ -4,7 +4,7 @@
Summary: System Inspection Framework Summary: System Inspection Framework
Name: sysSentry Name: sysSentry
Version: 1.0.2 Version: 1.0.2
Release: 13 Release: 14
License: Mulan PSL v2 License: Mulan PSL v2
Group: System Environment/Daemons Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
@ -24,6 +24,7 @@ Patch11: fix-configparser.InterpolationSyntaxError.patch
Patch12: fix-syssentry-fails-to-be-started-when-cpu_sentry-is.patch Patch12: fix-syssentry-fails-to-be-started-when-cpu_sentry-is.patch
Patch13: optimize-the-handing-of-cat-cli-error-msg-in-cpu_sentry.patch Patch13: optimize-the-handing-of-cat-cli-error-msg-in-cpu_sentry.patch
Patch14: over-threshold-should-be-warn-level-log-in-cat-cli.patch Patch14: over-threshold-should-be-warn-level-log-in-cat-cli.patch
Patch15: add-separator-to-err-info.patch
BuildRequires: cmake gcc-c++ BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools BuildRequires: python3 python3-setuptools
@ -181,6 +182,12 @@ rm -rf %{buildroot}
%attr(0550,root,root) %{python3_sitelib}/syssentry/cpu_* %attr(0550,root,root) %{python3_sitelib}/syssentry/cpu_*
%changelog %changelog
* Wed Sep 25 2024 shixuantong <shixuantong1@huawei.com> - 1.0.2-14
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:add separator to err info
* Sat Sep 21 2024 shixuantong <shixuantong1@huawei.com> - 1.0.2-13 * Sat Sep 21 2024 shixuantong <shixuantong1@huawei.com> - 1.0.2-13
- Type:bugfix - Type:bugfix
- CVE:NA - CVE:NA