add deleted code to plugin rasdaemon

(cherry picked from commit e338254e4494a9e209f74a148ed014eeaffcab13)
This commit is contained in:
zhuofeng 2024-08-31 09:35:05 +08:00 committed by openeuler-sync-bot
parent 415c6241f7
commit 48398f7d07
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From eca8c542875aef5cfbf947d697c4b644490d1c05 Mon Sep 17 00:00:00 2001
From: zhuofeng <zhuofeng2@huawei.com>
Date: Fri, 30 Aug 2024 19:58:41 +0800
Subject: [PATCH] add deleted code to plugin rasdaemon
---
src/python/syssentry/syssentry.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/python/syssentry/syssentry.py b/src/python/syssentry/syssentry.py
index 32b81e3..3d5cb8d 100644
--- a/src/python/syssentry/syssentry.py
+++ b/src/python/syssentry/syssentry.py
@@ -462,6 +462,14 @@ def main_loop():
epoll_fd.register(cpu_alarm_fd.fileno(), select.EPOLLIN)
logging.debug("start main loop")
+ # onstart_tasks_handle()
+ for task_type in TasksMap.tasks_dict:
+ for task_name in TasksMap.tasks_dict.get(task_type):
+ task = TasksMap.tasks_dict.get(task_type).get(task_name)
+ if not task:
+ continue
+ task.onstart_handle()
+
while True:
try:
events_list = epoll_fd.poll(SERVER_EPOLL_TIMEOUT)
--
2.33.0

View File

@ -4,7 +4,7 @@
Summary: System Inspection Framework
Name: sysSentry
Version: 1.0.2
Release: 6
Release: 7
License: Mulan PSL v2
Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
@ -17,6 +17,7 @@ Patch4: fix-result-when-process-output-is-None.patch
Patch5: cpu_utility-and-cpu_patrol-must-be-an-integer.patch
Patch6: setting-parameters-must-be-integer.patch
Patch7: param-must-be-integer.patch
Patch8: add-deleted-code-to-plugin-rasdaemon.patch
BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools
@ -173,6 +174,12 @@ rm -rf %{buildroot}
%attr(0550,root,root) %{python3_sitelib}/syssentry/cpu_*
%changelog
* Sat Aug 31 2024 zhuofeng <zhuofeng2@huawei.com> - 1.0.2-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:add deleted code to plugin rasdaemon
* Fri Aug 30 2024 shixuantong <shixuantong1@huawei.com> - 1.0.2-6
- Type:bugfix
- CVE:NA