!182 change status of period task and sort mod file
From: @zhuofeng6 Reviewed-by: @znzjugod Signed-off-by: @znzjugod
This commit is contained in:
commit
0fe480bf25
36
change-status-of-period-task-and-sort-mod-file.patch
Normal file
36
change-status-of-period-task-and-sort-mod-file.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 8cc13a422ed29e48b0c5b86b2da2a5dc8ad4aa59 Mon Sep 17 00:00:00 2001
|
||||
From: zhuofeng <zhuofeng6@huawei.com>
|
||||
Date: Fri, 13 Dec 2024 11:20:55 +0800
|
||||
Subject: [PATCH] change status of period task and sort mod file
|
||||
|
||||
---
|
||||
src/python/syssentry/cron_process.py | 1 +
|
||||
src/python/syssentry/load_mods.py | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/python/syssentry/cron_process.py b/src/python/syssentry/cron_process.py
|
||||
index 50780b3..5543d67 100644
|
||||
--- a/src/python/syssentry/cron_process.py
|
||||
+++ b/src/python/syssentry/cron_process.py
|
||||
@@ -144,6 +144,7 @@ def period_tasks_handle():
|
||||
|
||||
if not task.onstart:
|
||||
logging.debug("period onstart not enabled, task: %s", task.name)
|
||||
+ task.runtime_status = EXITED_STATUS
|
||||
continue
|
||||
|
||||
if task.runtime_status == WAITING_STATUS and \
|
||||
diff --git a/src/python/syssentry/load_mods.py b/src/python/syssentry/load_mods.py
|
||||
index 48d7e66..5be5540 100644
|
||||
--- a/src/python/syssentry/load_mods.py
|
||||
+++ b/src/python/syssentry/load_mods.py
|
||||
@@ -224,6 +224,7 @@ def load_tasks():
|
||||
return "failed", ""
|
||||
|
||||
mod_files = os.listdir(TASKS_STORAGE_PATH)
|
||||
+ mod_files.sort()
|
||||
for mod_file in mod_files:
|
||||
logging.debug("find mod, path is %s", mod_file)
|
||||
if not mod_file.endswith(MOD_FILE_SUFFIX):
|
||||
--
|
||||
2.33.0
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: System Inspection Framework
|
||||
Name: sysSentry
|
||||
Version: 1.0.2
|
||||
Release: 62
|
||||
Release: 63
|
||||
License: Mulan PSL v2
|
||||
Group: System Environment/Daemons
|
||||
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
@ -84,6 +84,7 @@ Patch71: ai_block_io-fix-some-config-parameters-parse-bug.patch
|
||||
Patch72: update-nvme-config.patch
|
||||
Patch73: make-debug-msg-clear.patch
|
||||
Patch74: add-boundary-check-for-settings.patch
|
||||
Patch75: change-status-of-period-task-and-sort-mod-file.patch
|
||||
|
||||
BuildRequires: cmake gcc-c++
|
||||
BuildRequires: python3 python3-setuptools
|
||||
@ -206,6 +207,9 @@ install -d -m 700 %{buildroot}/etc/sysSentry/plugins/
|
||||
install -m 600 config/inspect.conf %{buildroot}%{_sysconfdir}/sysSentry
|
||||
install -m 600 service/sysSentry.service %{buildroot}%{_unitdir}
|
||||
|
||||
# rasdaemon
|
||||
install config/tasks/rasdaemon.mod %{buildroot}/etc/sysSentry/tasks/
|
||||
|
||||
# xalarm
|
||||
sh build/build.sh -i %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
@ -288,6 +292,7 @@ rm -rf %{buildroot}
|
||||
%attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks
|
||||
%attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/plugins
|
||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/inspect.conf
|
||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/rasdaemon.mod
|
||||
%attr(0600,root,root) %{_unitdir}/sysSentry.service
|
||||
|
||||
# xalarm
|
||||
@ -377,6 +382,12 @@ rm -rf %{buildroot}
|
||||
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
||||
|
||||
%changelog
|
||||
* Fri Dec 13 2024 zhuofeng <zhuofeng2@huawei.com> - 1.0.2-63
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC: change status of period task and sort mod file
|
||||
|
||||
* Wed Nov 6 2024 luckky <guodashun1@huawei.com> - 1.0.2-62
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user