ai_block_io lack section exit
This commit is contained in:
parent
8590aee23d
commit
a7571573cc
98
ai_block_io-lack-section-exit.patch
Normal file
98
ai_block_io-lack-section-exit.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 8e4f39897dc8dc51cfa0bbf24667be1688876c15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com>
|
||||||
|
Date: Mon, 21 Oct 2024 14:18:20 +0800
|
||||||
|
Subject: [PATCH] ai_block_io lack section exit
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ai_block_io/config_parser.py | 40 +++++++++----------
|
||||||
|
1 file changed, 20 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/python/sentryPlugins/ai_block_io/config_parser.py b/src/python/sentryPlugins/ai_block_io/config_parser.py
|
||||||
|
index 7b0cd29..447eccd 100644
|
||||||
|
--- a/src/python/sentryPlugins/ai_block_io/config_parser.py
|
||||||
|
+++ b/src/python/sentryPlugins/ai_block_io/config_parser.py
|
||||||
|
@@ -401,11 +401,9 @@ class ConfigParser:
|
||||||
|
self._read_stage(items_common)
|
||||||
|
self._read_iotype(items_common)
|
||||||
|
else:
|
||||||
|
- self._conf["common"]["stage"] = ALL_STAGE_LIST
|
||||||
|
- self._conf["common"]["iotype"] = ALL_IOTPYE_LIST
|
||||||
|
- logging.warning(
|
||||||
|
- "common section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found common section. exiting...")
|
||||||
|
+ logging.critical("not found common section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
|
||||||
|
if con.has_section("algorithm"):
|
||||||
|
items_algorithm = dict(con.items("algorithm"))
|
||||||
|
@@ -413,9 +411,9 @@ class ConfigParser:
|
||||||
|
self._read_train_update_duration(items_algorithm)
|
||||||
|
self._read_algorithm_type_and_parameter(items_algorithm)
|
||||||
|
else:
|
||||||
|
- logging.warning(
|
||||||
|
- "algorithm section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found algorithm section. exiting...")
|
||||||
|
+ logging.critical("not found algorithm section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
|
||||||
|
if con.has_section("sliding_window"):
|
||||||
|
items_sliding_window = dict(con.items("sliding_window"))
|
||||||
|
@@ -423,9 +421,9 @@ class ConfigParser:
|
||||||
|
self._read_window_size(items_sliding_window)
|
||||||
|
self._read_window_minimum_threshold(items_sliding_window)
|
||||||
|
else:
|
||||||
|
- logging.warning(
|
||||||
|
- "sliding_window section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found sliding_window section. exiting...")
|
||||||
|
+ logging.critical("not found sliding_window section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
|
||||||
|
if con.has_section("latency_sata_ssd"):
|
||||||
|
items_latency_sata_ssd = dict(con.items("latency_sata_ssd"))
|
||||||
|
@@ -444,9 +442,10 @@ class ConfigParser:
|
||||||
|
gt=0,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
- logging.warning(
|
||||||
|
- "latency_sata_ssd section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found latency_sata_ssd section. exiting...")
|
||||||
|
+ logging.critical("not found latency_sata_ssd section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
+
|
||||||
|
if con.has_section("latency_nvme_ssd"):
|
||||||
|
items_latency_nvme_ssd = dict(con.items("latency_nvme_ssd"))
|
||||||
|
self._conf["latency_nvme_ssd"]["read_tot_lim"] = self._get_config_value(
|
||||||
|
@@ -464,9 +463,10 @@ class ConfigParser:
|
||||||
|
gt=0,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
- logging.warning(
|
||||||
|
- "latency_nvme_ssd section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found latency_nvme_ssd section. exiting...")
|
||||||
|
+ logging.critical("not found latency_nvme_ssd section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
+
|
||||||
|
if con.has_section("latency_sata_hdd"):
|
||||||
|
items_latency_sata_hdd = dict(con.items("latency_sata_hdd"))
|
||||||
|
self._conf["latency_sata_hdd"]["read_tot_lim"] = self._get_config_value(
|
||||||
|
@@ -484,9 +484,9 @@ class ConfigParser:
|
||||||
|
gt=0,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
- logging.warning(
|
||||||
|
- "latency_sata_hdd section parameter not found, it will be set to default value."
|
||||||
|
- )
|
||||||
|
+ Report.report_pass("not found latency_sata_hdd section. exiting...")
|
||||||
|
+ logging.critical("not found latency_sata_hdd section. exiting...")
|
||||||
|
+ exit(1)
|
||||||
|
|
||||||
|
self.__print_all_config_value()
|
||||||
|
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: System Inspection Framework
|
Summary: System Inspection Framework
|
||||||
Name: sysSentry
|
Name: sysSentry
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 43
|
Release: 44
|
||||||
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
|
||||||
@ -64,6 +64,7 @@ Patch51: precise-alarm-query-time.patch
|
|||||||
Patch52: fix-word-error.patch
|
Patch52: fix-word-error.patch
|
||||||
Patch53: optimize-log-printing.patch
|
Patch53: optimize-log-printing.patch
|
||||||
Patch54: enrich-alert-info-about-kernel-stack.patch
|
Patch54: enrich-alert-info-about-kernel-stack.patch
|
||||||
|
Patch55: ai_block_io-lack-section-exit.patch
|
||||||
|
|
||||||
BuildRequires: cmake gcc-c++
|
BuildRequires: cmake gcc-c++
|
||||||
BuildRequires: python3 python3-setuptools
|
BuildRequires: python3 python3-setuptools
|
||||||
@ -326,6 +327,12 @@ rm -rf %{buildroot}
|
|||||||
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin*
|
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 21 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-44
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:ai_block_io lack section exit
|
||||||
|
|
||||||
* Wed Oct 16 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-43
|
* Wed Oct 16 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-43
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user