From 0e8be0485a813fbe73c5017fdea0e0d1e08b1d7a Mon Sep 17 00:00:00 2001 From: "gaoruoshu@huawei.com" Date: Wed, 16 Aug 2023 12:48:51 +0800 Subject: [PATCH] atune-collector: add backup for apps (cherry picked from commit 5e2528b4e5ad462a1172b400846ecc043bcbc9ec) (cherry picked from commit 3eb8f78c6342d58be75c1f4311ee23aa21e132b4) --- atune-collector-add-backup-for-apps.patch | 56 +++++++++++++++++++++++ atune-collector.spec | 6 ++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 atune-collector-add-backup-for-apps.patch diff --git a/atune-collector-add-backup-for-apps.patch b/atune-collector-add-backup-for-apps.patch new file mode 100644 index 0000000..9aa0392 --- /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 cc98480..99dd824 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 -- Gitee