!230 [sync] PR-213: fix the sentryCollector service can't be stopped for a long
From: @openeuler-sync-bot Reviewed-by: @znzjugod Signed-off-by: @znzjugod
This commit is contained in:
commit
26ec8137f8
37
fix-the-sentryCollector-service-can-t-be-stopped-for.patch
Normal file
37
fix-the-sentryCollector-service-can-t-be-stopped-for.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 93a58d1e0faee37cbc27981c85f41c50e81bdc66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhuofeng <1107893276@qq.com>
|
||||||
|
Date: Mon, 24 Feb 2025 03:00:57 +0000
|
||||||
|
Subject: [PATCH] fix the sentryCollector service can't be stopped for a long
|
||||||
|
time.
|
||||||
|
|
||||||
|
Signed-off-by: zhuofeng <1107893276@qq.com>
|
||||||
|
---
|
||||||
|
src/services/sentryCollector/collect_io.py | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/services/sentryCollector/collect_io.py b/src/services/sentryCollector/collect_io.py
|
||||||
|
index 10446d9..6db28ec 100644
|
||||||
|
--- a/src/services/sentryCollector/collect_io.py
|
||||||
|
+++ b/src/services/sentryCollector/collect_io.py
|
||||||
|
@@ -405,10 +405,17 @@ class CollectIo():
|
||||||
|
self
|
||||||
|
) -> None:
|
||||||
|
global EBPF_PROCESS
|
||||||
|
- if EBPF_PROCESS:
|
||||||
|
+ if not EBPF_PROCESS:
|
||||||
|
+ logging.debug("No eBPF process to stop")
|
||||||
|
+ return
|
||||||
|
+ try:
|
||||||
|
EBPF_PROCESS.terminate()
|
||||||
|
+ EBPF_PROCESS.wait(timeout=3)
|
||||||
|
+ except subprocess.TimeoutExpired:
|
||||||
|
+ logging.debug("eBPF process did not exit within timeout. Forcing kill.")
|
||||||
|
+ EBPF_PROCESS.kill()
|
||||||
|
EBPF_PROCESS.wait()
|
||||||
|
- logging.info("ebpf collector thread exit")
|
||||||
|
+ logging.info("ebpf collector thread exit")
|
||||||
|
|
||||||
|
def main_loop(self):
|
||||||
|
global IO_GLOBAL_DATA
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: System Inspection Framework
|
Summary: System Inspection Framework
|
||||||
Name: sysSentry
|
Name: sysSentry
|
||||||
Version: 1.0.3
|
Version: 1.0.3
|
||||||
Release: 6
|
Release: 7
|
||||||
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
|
||||||
@ -14,6 +14,7 @@ Patch2: fix-some-test-cases.patch
|
|||||||
Patch3: add-log-for-xalarmd-and-fix-delete-on-iter-problem.patch
|
Patch3: add-log-for-xalarmd-and-fix-delete-on-iter-problem.patch
|
||||||
Patch4: fix-xalarm-log-not-print-and-add-on-iter-problem.patch
|
Patch4: fix-xalarm-log-not-print-and-add-on-iter-problem.patch
|
||||||
Patch5: add-new-func-for-ebpf-in-the-rq_driver-stage.patch
|
Patch5: add-new-func-for-ebpf-in-the-rq_driver-stage.patch
|
||||||
|
Patch6: fix-the-sentryCollector-service-can-t-be-stopped-for.patch
|
||||||
|
|
||||||
BuildRequires: cmake gcc-c++
|
BuildRequires: cmake gcc-c++
|
||||||
BuildRequires: python3 python3-setuptools
|
BuildRequires: python3 python3-setuptools
|
||||||
@ -210,6 +211,12 @@ rm -rf /var/run/sysSentry | :
|
|||||||
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 24 2025 zhuofeng <zhuofeng2@huawei.com> - 1.0.3-7
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: fix the sentryCollector service can't be stopped for a long
|
||||||
|
|
||||||
* Sat Feb 22 2025 zhuofeng <zhuofeng2@huawei.com> - 1.0.3-6
|
* Sat Feb 22 2025 zhuofeng <zhuofeng2@huawei.com> - 1.0.3-6
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user