!41 atune-adm check error before atune-adm profile
From: @gaoruoshu Reviewed-by: @hanxinke Signed-off-by: @hanxinke
This commit is contained in:
commit
eeee6d5327
@ -13,6 +13,7 @@ Patch2: atune-update-file-description-and-testcase.patch
|
|||||||
|
|
||||||
Patch6001: backport-atune-add-go-compile-flag.patch
|
Patch6001: backport-atune-add-go-compile-flag.patch
|
||||||
Patch6002: backport-atune-add-successExitStatus-100-to-atuned.service.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: rpm-build golang-bin procps-ng
|
||||||
BuildRequires: sqlite >= 3.24.0 openssl
|
BuildRequires: sqlite >= 3.24.0 openssl
|
||||||
@ -146,6 +147,9 @@ make models
|
|||||||
%systemd_postun_with_restart atuned.service
|
%systemd_postun_with_restart atuned.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 29 2021 gaoruoshu <gaoruoshu@huawei.com> - 0.3-1.0
|
||||||
|
- atune-adm check error before atune-adm profile
|
||||||
|
|
||||||
* Mon Aug 30 2021 gaoruoshu <gaoruoshu@huawei.com> - 0.3-0.9
|
* Mon Aug 30 2021 gaoruoshu <gaoruoshu@huawei.com> - 0.3-0.9
|
||||||
- add successExitStatus 100 to atuned.service
|
- add successExitStatus 100 to atuned.service
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
From 44588c0b01eb915e43366489a78dfc3ae9a4f9f8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: EnboKang <kangenbo@huawei.com>
|
||||||
|
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
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user