diff --git a/sysSentry.spec b/sysSentry.spec index b946ad2b917bd571448d2b0b145cc6b5a46d0da3..632ad364f7754193ca5939382fca306da74aefce 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 45 +Release: 46 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -66,6 +66,7 @@ Patch53: optimize-log-printing.patch Patch54: enrich-alert-info-about-kernel-stack.patch Patch55: ai_block_io-lack-section-exit.patch Patch56: fix-xalarm-non-uniform-log-formatting.patch +Patch57: update-collect-plugin-period-max.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -328,6 +329,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin* %changelog +* Mon Oct 21 2024 zhuofeng - 1.0.2-46 +- Type:bugfix +- CVE:NA +- SUG:NA +- DES:update collect plugin period max + * Mon Oct 21 2024 caixiaomeng - 1.0.2-45 - Type:bugfix - CVE:NA diff --git a/update-collect-plugin-period-max.patch b/update-collect-plugin-period-max.patch new file mode 100644 index 0000000000000000000000000000000000000000..42d244d851a74d0d976c67851e03ac52cbed3110 --- /dev/null +++ b/update-collect-plugin-period-max.patch @@ -0,0 +1,44 @@ +From 4550d9cbbb7e921db168f748e8b1d5d7cc0f8b15 Mon Sep 17 00:00:00 2001 +From: zhuofeng +Date: Mon, 21 Oct 2024 17:30:39 +0800 +Subject: [PATCH] update collect plugin period max + +--- + src/python/sentryCollector/collect_plugin.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/python/sentryCollector/collect_plugin.py b/src/python/sentryCollector/collect_plugin.py +index 53dddec..9495d8b 100644 +--- a/src/python/sentryCollector/collect_plugin.py ++++ b/src/python/sentryCollector/collect_plugin.py +@@ -45,6 +45,9 @@ LIMIT_IOTYPE_LIST_LEN = 4 + LIMIT_PERIOD_MIN_LEN = 1 + LIMIT_PERIOD_MAX_LEN = 300 + ++# max_save ++LIMIT_MAX_SAVE_LEN = 300 ++ + # interface protocol + class ClientProtocol(): + IS_IOCOLLECT_VALID = 0 +@@ -189,7 +192,7 @@ def inter_is_iocollect_valid(period, disk_list=None, stage=None): + if not period or not isinstance(period, int): + result['ret'] = ResultMessage.RESULT_NOT_PARAM + return result +- if period < LIMIT_PERIOD_MIN_LEN or period > LIMIT_PERIOD_MAX_LEN: ++ if period < LIMIT_PERIOD_MIN_LEN or period > LIMIT_PERIOD_MAX_LEN * LIMIT_MAX_SAVE_LEN: + result['ret'] = ResultMessage.RESULT_INVALID_LENGTH + return result + +@@ -246,7 +249,7 @@ def inter_get_io_data(period, disk_list, stage, iotype): + if not isinstance(period, int): + result['ret'] = ResultMessage.RESULT_NOT_PARAM + return result +- if period < LIMIT_PERIOD_MIN_LEN or period > LIMIT_PERIOD_MAX_LEN: ++ if period < LIMIT_PERIOD_MIN_LEN or period > LIMIT_PERIOD_MAX_LEN * LIMIT_MAX_SAVE_LEN: + result['ret'] = ResultMessage.RESULT_INVALID_LENGTH + return result + +-- +2.33.0 +