From 9a4532529c865d7e9263076627839ce0d051379a Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Sat, 19 Sep 2020 15:48:46 +0800 Subject: [PATCH] When installing framework slave, if db_tars has not been created, exit --- Changelist.md | 2 ++ deploy/tars-install.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Changelist.md b/Changelist.md index 9c450e2b..723f3fbc 100644 --- a/Changelist.md +++ b/Changelist.md @@ -5,12 +5,14 @@ - tarsAdminRegistry supports only historical publishing records (the latest 200 by default), and the configuration can be modified in the template - tarsAdminRegistry supports patch timeout configuration, which can be modified in the template - Support parameters during deployment, covering configuration files and templates +- When installing framework slave, if db_tars has not been created, exit ### cn - 完善部署脚本, 支持overwrite模式, 覆盖配置和模板文件 - tarsAdminRegistry支持保存历史发布记录(每个服务缺省200条), 可以在模板中修改配置 - tarsAdminRegistry发布支持超时配置, 可以在模板中修改配置 - 部署时支持参数, 覆盖配置文件和模板 +- 安装framework slave时, 如果db_tars还没有创建, 则退出 ## v2.4.6 2020.09.02 ### en diff --git a/deploy/tars-install.sh b/deploy/tars-install.sh index 4582fc15..90699fba 100755 --- a/deploy/tars-install.sh +++ b/deploy/tars-install.sh @@ -471,6 +471,12 @@ if [ "${SLAVE}" != "true" ]; then LOG_INFO "create master servers"; exec_mysql_sql db_tars tars_servers_master.sql +else + exec_mysql_has "db_tars" + if [ $? != 0 ]; then + LOG_ERROR "no db_tars exists, please install master first, install will exit" + exit 1 + fi fi #current server info