fix grey upgrade version number

This commit is contained in:
shirley_zhengx
2021-09-27 16:27:13 +08:00
parent df79350c04
commit 5fe41f8aaf
4 changed files with 25 additions and 8 deletions

View File

@ -1286,7 +1286,13 @@ class UpgradeImpl:
start cluster in grey upgrade
:return:
"""
cmd = "gs_om -t start"
versionFile = os.path.join(
self.context.oldClusterAppPath, "bin/upgrade_version")
if os.path.exists(versionFile):
_, number, _ = VersionInfo.get_version_info(versionFile)
cmd = "gs_om -t start --cluster-number='%s'" % (number)
else:
cmd = "gs_om -t start"
(status, output) = subprocess.getstatusoutput(cmd)
if status != 0:
raise Exception(ErrorCode.GAUSS_514["GAUSS_51400"] %