From b158c20b62f805ca02fe6819b0e3d36edb26c657 Mon Sep 17 00:00:00 2001 From: hangjin2020 <850894759@qq.com> Date: Thu, 30 Sep 2021 15:03:35 +0800 Subject: [PATCH] =?UTF-8?q?om=E8=A7=A3=E8=80=A6=EF=BC=8C=E6=89=BE=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E7=89=88=E6=9C=AC=E4=B8=80=E8=87=B4=E7=9A=84=E5=86=85?= =?UTF-8?q?=E6=A0=B8=E5=8C=85=EF=BC=8C=E5=86=8D=E5=B0=9D=E8=AF=95=E6=89=BE?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=9B=AE=E5=BD=95=E7=89=88=E6=9C=AC=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=86=85=E6=A0=B8=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gs_preinstall | 13 +++++++------ simpleInstall/one_master_one_slave.sh | 2 +- simpleInstall/one_master_one_slave_template.xml | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/script/gs_preinstall b/script/gs_preinstall index 5cfdd2b..77a775d 100644 --- a/script/gs_preinstall +++ b/script/gs_preinstall @@ -323,13 +323,14 @@ General options: def decompressVersioncfg(self): package_path = os.path.dirname(os.path.realpath(__file__)) toolpath = package_path + "/../" - cmd = "cd " + toolpath + \ - " && tar -xpf `head -1 version.cfg`*.tar.bz2 ./version.cfg" - (status, output) = subprocess.getstatusoutput(cmd) + cmd = "cd " + toolpath + " && tar -xpf `head -1 version.cfg`*.tar.bz2 ./version.cfg" + (status, _) = subprocess.getstatusoutput(cmd) if status != 0: - GaussLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50217"] - % "version.cfg" + "The cmd is %s. " % cmd + - "The output is %s." % output) + cmd = "cd " + toolpath + " && tar -xpf `ls openGauss*.tar.bz2|tail -1` ./version.cfg" + (status, output) = subprocess.getstatusoutput(cmd) + if status != 0: + GaussLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50217"] % "version.cfg" + + "The cmd is %s. " % cmd + "The output is %s." % output) # init global variables def initGlobals(self): diff --git a/simpleInstall/one_master_one_slave.sh b/simpleInstall/one_master_one_slave.sh index 8c2b416..6d4fd5e 100644 --- a/simpleInstall/one_master_one_slave.sh +++ b/simpleInstall/one_master_one_slave.sh @@ -28,7 +28,7 @@ function print_help() echo "Usage: $0 [OPTION] -?|--help show help information -U|--user_name cluster user - -h|--host_ip intranet ip address of the host in the backend storage network(host1,host2) + -H|--host_ip intranet ip address of the host in the backend storage network(host1,host2) -G|--user_grp group of the cluster user(default value dbgrp) -p|--port database server port(default value 20050) -D|--install_location installation directory of the openGauss program(default value ~/cluser) diff --git a/simpleInstall/one_master_one_slave_template.xml b/simpleInstall/one_master_one_slave_template.xml index 9735758..c640449 100644 --- a/simpleInstall/one_master_one_slave_template.xml +++ b/simpleInstall/one_master_one_slave_template.xml @@ -20,7 +20,7 @@ - +