diff --git a/atune-collector-add-backup-for-apps.patch b/atune-collector-add-backup-for-apps.patch new file mode 100644 index 0000000000000000000000000000000000000000..9aa03925f1a0005b401c43e948fd909219e37ac7 --- /dev/null +++ b/atune-collector-add-backup-for-apps.patch @@ -0,0 +1,56 @@ +From bfe9d212c518944678bbf526d61a8e778f378b41 Mon Sep 17 00:00:00 2001 +From: gaoruoshu +Date: Wed, 16 Aug 2023 12:36:46 +0800 +Subject: [PATCH] [atune-collector]add backup for apps + +--- + atune_collector/plugin/configurator/mysql/mysql.py | 3 +++ + atune_collector/plugin/configurator/nginx/nginx.py | 3 +++ + atune_collector/plugin/configurator/redis/redis.py | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/atune_collector/plugin/configurator/mysql/mysql.py b/atune_collector/plugin/configurator/mysql/mysql.py +index e472a1c..9badd21 100644 +--- a/atune_collector/plugin/configurator/mysql/mysql.py ++++ b/atune_collector/plugin/configurator/mysql/mysql.py +@@ -81,6 +81,9 @@ class Mysql(Configurator): + def _get(self, key, _): + pass + ++ def _backup(self, config, _): ++ return str(config) ++ + @staticmethod + def check(config1, config2): + return True +diff --git a/atune_collector/plugin/configurator/nginx/nginx.py b/atune_collector/plugin/configurator/nginx/nginx.py +index 9d38dd0..7f7eaad 100644 +--- a/atune_collector/plugin/configurator/nginx/nginx.py ++++ b/atune_collector/plugin/configurator/nginx/nginx.py +@@ -198,6 +198,9 @@ class Nginx(Configurator): + def _get(self, key, _): + pass + ++ def _backup(self, config, _): ++ return str(config) ++ + @staticmethod + def check(config1, config2): + return True +diff --git a/atune_collector/plugin/configurator/redis/redis.py b/atune_collector/plugin/configurator/redis/redis.py +index aa14bcd..44da99e 100644 +--- a/atune_collector/plugin/configurator/redis/redis.py ++++ b/atune_collector/plugin/configurator/redis/redis.py +@@ -68,6 +68,9 @@ class Redis(Configurator): + def _get(self, key, _): + pass + ++ def _backup(self, config, _): ++ return str(config) ++ + @staticmethod + def check(config1, config2): + return True +-- +2.27.0 + diff --git a/atune-collector.spec b/atune-collector.spec index cc98480b285ad6df3a4f22eaf75922b7f05edfe4..99dd82459ee7a4fb4a45925ac8c59c4ed8879587 100644 --- a/atune-collector.spec +++ b/atune-collector.spec @@ -2,7 +2,7 @@ Name: atune-collector Version: 1.1.0 -Release: 3 +Release: 4 Summary: A-Tune-Collector is used to collect various system resources. License: Mulan PSL v2 URL: https://gitee.com/openeuler/A-Tune-Collector @@ -19,6 +19,7 @@ Patch8: feature-set-redis-value.patch Patch9: feature-set-nginx.patch Patch10: bugfix-create-file-only-if-setting-params.patch Patch11: change-import-behavior.patch +Patch12: atune-collector-add-backup-for-apps.patch BuildRequires: python3-setuptools Requires: python3-dict2xml @@ -43,6 +44,9 @@ The A-Tune-Collector is used to collect various system resources and can also be %attr(0600,root,root) %{_sysconfdir}/atune_collector/* %changelog +* Wed Aug 16 2023 gaoruoshu - 1.1.0-4 +- atune-collector: add backup for apps + * Tue Aug 01 2023 gaoruoshu - 1.1.0-3 - feature: enable application config