fix grey upgrade version number
This commit is contained in:
@ -216,11 +216,18 @@ class OmImplOLAP(OmImpl):
|
||||
time_out = DefaultValue.TIMEOUT_CLUSTER_START
|
||||
else:
|
||||
time_out = self.time_out
|
||||
cmd = "source %s; %s -U %s -R %s -t %s --security-mode=%s" % (
|
||||
self.context.g_opts.mpprcFile,
|
||||
OMCommand.getLocalScript("Local_StartInstance"),
|
||||
self.context.user, self.context.clusterInfo.appPath, time_out,
|
||||
self.context.g_opts.security_mode)
|
||||
if self.context.g_opts.cluster_number:
|
||||
cmd = "source %s; %s -U %s -R %s -t %s --security-mode=%s --cluster_number=%s" % (
|
||||
self.context.g_opts.mpprcFile,
|
||||
OMCommand.getLocalScript("Local_StartInstance"),
|
||||
self.context.user, self.context.clusterInfo.appPath, time_out,
|
||||
self.context.g_opts.security_mode, self.context.g_opts.cluster_number)
|
||||
else:
|
||||
cmd = "source %s; %s -U %s -R %s -t %s --security-mode=%s" % (
|
||||
self.context.g_opts.mpprcFile,
|
||||
OMCommand.getLocalScript("Local_StartInstance"),
|
||||
self.context.user, self.context.clusterInfo.appPath, time_out,
|
||||
self.context.g_opts.security_mode)
|
||||
if self.dataDir != "":
|
||||
cmd += " -D %s" % self.dataDir
|
||||
failedOutput = ''
|
||||
|
@ -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"] %
|
||||
|
Reference in New Issue
Block a user