diff --git a/sysSentry.spec b/sysSentry.spec index 85aa3616c6c7488d56e55c16c51c7bec6321fd3c..eb8890f91bc2a4d1bf80af26be7f44120fbe8e5a 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 24 +Release: 25 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -37,6 +37,7 @@ Patch24: fix-python-3.7-not-support-list-bool-type.patch Patch25: avg_block_io-send-alarm-to-xalarmd.patch Patch26: bugfix-typo.patch Patch27: fix-config-relative-some-issues.patch +Patch28: update-log-when-it-is-not-lock-collect.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -279,6 +280,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io %changelog +* Wed Oct 9 2024 zhuofeng - 1.0.2-25 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:update log when it is not lock collect + * Wed Oct 9 2024 heyouzhi - 1.0.2-24 - Type:bugfix - CVE:NA diff --git a/update-log-when-it-is-not-lock-collect.patch b/update-log-when-it-is-not-lock-collect.patch new file mode 100644 index 0000000000000000000000000000000000000000..634a2b9f2e048d9c7b3d9567a5aa819da9cf1f46 --- /dev/null +++ b/update-log-when-it-is-not-lock-collect.patch @@ -0,0 +1,35 @@ +From ac73565fdb0e4bc544e5308ea0251dd6be410ed9 Mon Sep 17 00:00:00 2001 +From: zhuofeng +Date: Wed, 9 Oct 2024 16:37:24 +0800 +Subject: [PATCH] update log when it is not lock collect + +--- + src/python/sentryCollector/collect_io.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/python/sentryCollector/collect_io.py b/src/python/sentryCollector/collect_io.py +index e45947a..2e75187 100644 +--- a/src/python/sentryCollector/collect_io.py ++++ b/src/python/sentryCollector/collect_io.py +@@ -179,13 +179,17 @@ class CollectIo(): + blk_io_hierarchy_path = os.path.join(disk_path, 'blk_io_hierarchy') + + if not os.path.exists(blk_io_hierarchy_path): +- logging.error("no blk_io_hierarchy directory found in %s, skipping.", disk_name) ++ logging.warning("no blk_io_hierarchy directory found in %s, skipping.", disk_name) + continue + + for file_name in os.listdir(blk_io_hierarchy_path): + file_path = os.path.join(blk_io_hierarchy_path, file_name) + if file_name == 'stats': + all_disk.append(disk_name) ++ ++ if len(all_disk) == 0: ++ logging.debug("no blk_io_hierarchy disk, it is not lock-free collection") ++ return False + + if self.loop_all: + self.disk_list = all_disk +-- +2.33.0 +