!38 add successExitStatus 100 to atuned.service
From: @hanxinke Reviewed-by: @gaoruoshu Signed-off-by: @gaoruoshu
This commit is contained in:
commit
9f45bbf2dd
@ -3,7 +3,7 @@
|
||||
Summary: AI auto tuning system
|
||||
Name: atune
|
||||
Version: 0.3
|
||||
Release: 0.8
|
||||
Release: 0.9
|
||||
License: Mulan PSL v2
|
||||
URL: https://gitee.com/openeuler/A-Tune
|
||||
Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
|
||||
@ -12,6 +12,7 @@ Patch1: atune-support-for-Go-1.15.patch
|
||||
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
|
||||
|
||||
BuildRequires: rpm-build golang-bin procps-ng
|
||||
BuildRequires: sqlite >= 3.24.0 openssl
|
||||
@ -145,6 +146,9 @@ make models
|
||||
%systemd_postun_with_restart atuned.service
|
||||
|
||||
%changelog
|
||||
* Tue Sep 28 2021 hanxinke <hanxinke@huawei.com> - 0.3-0.9
|
||||
- add successExitStatus 100 to atuned.service
|
||||
|
||||
* Sat Mar 20 2021 BruceGW <gyl93216@163.com> - 0.3-0.8
|
||||
- add go compile flag
|
||||
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
From e45f1c5d09938dc2911c0b5d57ef8feb1b951c97 Mon Sep 17 00:00:00 2001
|
||||
From: Zhipeng Xie <xiezhipeng1@huawei.com>
|
||||
Date: Sun, 20 Sep 2020 23:59:54 -0400
|
||||
Subject: [PATCH] Add SuccessExitStatus=100 to atuned.service
|
||||
|
||||
call os.Exit(100) when get killed signal
|
||||
|
||||
Fix https://gitee.com/openeuler/A-Tune/issues/I1VCQY?from=project-issue
|
||||
|
||||
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
|
||||
---
|
||||
common/service/pyservice/pyservice.go | 4 ++--
|
||||
misc/atuned.service | 1 +
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/common/service/pyservice/pyservice.go b/common/service/pyservice/pyservice.go
|
||||
index 99b2239..b3df55c 100644
|
||||
--- a/common/service/pyservice/pyservice.go
|
||||
+++ b/common/service/pyservice/pyservice.go
|
||||
@@ -14,10 +14,10 @@
|
||||
package pyservice
|
||||
|
||||
import (
|
||||
+ "bufio"
|
||||
"gitee.com/openeuler/A-Tune/common/config"
|
||||
"gitee.com/openeuler/A-Tune/common/log"
|
||||
"gitee.com/openeuler/A-Tune/common/registry"
|
||||
- "bufio"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -94,5 +94,5 @@ func listenToSystemSignals(cmd *exec.Cmd) {
|
||||
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)
|
||||
<-signalChan
|
||||
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
||||
- os.Exit(-1)
|
||||
+ os.Exit(100)
|
||||
}
|
||||
diff --git a/misc/atuned.service b/misc/atuned.service
|
||||
index e2a8851..3b31b6e 100644
|
||||
--- a/misc/atuned.service
|
||||
+++ b/misc/atuned.service
|
||||
@@ -6,6 +6,7 @@ Requires=polkit.service
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/usr/bin/atuned
|
||||
+SuccessExitStatus=100
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user