update vulcanus to 1.3.0-2
(cherry picked from commit 89813b1e324e3190adb9a0b46101bdedc0f65606)
This commit is contained in:
parent
425d65959c
commit
44faebc58f
43
0001-optimize-service-start-check-logic.patch
Normal file
43
0001-optimize-service-start-check-logic.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 2820dc579dad400c8b0f4dfe4220c3d78e218645 Mon Sep 17 00:00:00 2001
|
||||
From: gongzt <gong_zhengtang@163.com>
|
||||
Date: Wed, 30 Aug 2023 15:41:06 +0800
|
||||
Subject: [PATCH] = Optimize start service check logic
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
aops-vulcanus | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/aops-vulcanus b/aops-vulcanus
|
||||
index abb02b1..ba854f9 100644
|
||||
--- a/aops-vulcanus
|
||||
+++ b/aops-vulcanus
|
||||
@@ -100,8 +100,13 @@ function is_started() {
|
||||
function start_service() {
|
||||
module_name=$1
|
||||
echo "[INFO] 1. Before starting the service, ensure that the data table is initialized"
|
||||
- echo "[INFO] 2. Execute aops-basedatabase zeus or apollo to complete the data table initialization, For example '/opt/aops/script/aops-basedatabase init zues'"
|
||||
+ echo "[INFO] 2. Execute aops-basedatabase zeus or apollo to complete the data table initialization, For example '/opt/aops/script/aops-basedatabase init zeus'"
|
||||
uwsgi -d --ini ${OUT_PATH}/"${module_name}".ini --enable-threads
|
||||
+ pid=`ps auxww | grep $module_name.ini | grep -v grep | awk '{print $2}'`
|
||||
+ if [ "${pid}" = "" ]; then
|
||||
+ echo "[ERROR] start uwsgi service: ${module_name} failed"
|
||||
+ exit 1
|
||||
+ fi
|
||||
echo "[INFO] start uwsgi service: ${module_name} success"
|
||||
exit 0
|
||||
}
|
||||
@@ -167,7 +172,7 @@ function check_mysql_installed() {
|
||||
aops_database=$(get_config "$CONFIG_FILE" "mysql" "database_name")
|
||||
connect_check_cmd="import pymysql
|
||||
try:
|
||||
- connect = pymysql.connect(host='$mysql_ip', port=$port, password='123456', database='$aops_database')
|
||||
+ connect = pymysql.connect(host='$mysql_ip', port=$port, database='$aops_database')
|
||||
connect.close()
|
||||
except pymysql.err.OperationalError:
|
||||
print(False)
|
||||
--
|
||||
Gitee
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
Name: aops-vulcanus
|
||||
Version: v1.3.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A basic tool libraries of aops, including logging, configure and response, etc.
|
||||
License: MulanPSL2
|
||||
URL: https://gitee.com/openeuler/%{name}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: 0001-optimize-service-start-check-logic.patch
|
||||
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: python3-concurrent-log-handler python3-xmltodict python3-pyyaml python3-marshmallow >= 3.13.0
|
||||
@ -30,7 +31,7 @@ tools for aops, it's about aops deploy
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
|
||||
# build for aops-vulcanus
|
||||
@ -60,6 +61,9 @@ cp -r scripts %{buildroot}/opt/aops/
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 11 2023 zhuyuncheng<zhuyuncheng@huawei.com> - v1.3.0-2
|
||||
- optimize start service check logic
|
||||
|
||||
* Tue Aug 29 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-1
|
||||
- optimize project directory structure
|
||||
- support database initialization script
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user