diff --git a/atune.spec b/atune.spec index c08e1d6..5b1f0f4 100755 --- a/atune.spec +++ b/atune.spec @@ -13,6 +13,7 @@ Patch2: atune-update-file-description-and-testcase.patch Patch6001: backport-atune-add-go-compile-flag.patch Patch6002: backport-atune-add-successExitStatus-100-to-atuned.service.patch +Patch6003: backport-atune-bugfix-atune-adm-check-error-before-atune-adm-profile.patch BuildRequires: rpm-build golang-bin procps-ng BuildRequires: sqlite >= 3.24.0 openssl @@ -146,6 +147,9 @@ make models %systemd_postun_with_restart atuned.service %changelog +* Wed Sep 29 2021 gaoruoshu - 0.3-1.0 +- atune-adm check error before atune-adm profile + * Mon Aug 30 2021 gaoruoshu - 0.3-0.9 - add successExitStatus 100 to atuned.service diff --git a/backport-atune-bugfix-atune-adm-check-error-before-atune-adm-profile.patch b/backport-atune-bugfix-atune-adm-check-error-before-atune-adm-profile.patch new file mode 100644 index 0000000..355016d --- /dev/null +++ b/backport-atune-bugfix-atune-adm-check-error-before-atune-adm-profile.patch @@ -0,0 +1,35 @@ +From 44588c0b01eb915e43366489a78dfc3ae9a4f9f8 Mon Sep 17 00:00:00 2001 +From: EnboKang +Date: Wed, 23 Sep 2020 16:25:03 +0800 +Subject: [PATCH] bugfix: atune-adm check error before atune-adm profile + +--- + modules/client/profile/profile_check.go | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules/client/profile/profile_check.go b/modules/client/profile/profile_check.go +index 319055b..e05ab4d 100644 +--- a/modules/client/profile/profile_check.go ++++ b/modules/client/profile/profile_check.go +@@ -16,6 +16,7 @@ package profile + import ( + "fmt" + PB "gitee.com/openeuler/A-Tune/api/profile" ++ "strings" + "gitee.com/openeuler/A-Tune/common/client" + SVC "gitee.com/openeuler/A-Tune/common/service" + "gitee.com/openeuler/A-Tune/common/utils" +@@ -97,6 +98,10 @@ func profileCheck(ctx *cli.Context) error { + } + + if err != nil { ++ if strings.Contains(err.Error(), "no active profile or more than 1 active profile") { ++ fmt.Println("no active profile or more than 1 active profile") ++ break ++ } + return err + } + utils.Print(reply) +-- +1.8.3.1 +