fix grey upgrade version number
This commit is contained in:
@ -92,6 +92,7 @@ class CmdOptions():
|
||||
self.nodeId = -1
|
||||
self.clusterInfo = None
|
||||
self.security_mode = "off"
|
||||
self.cluster_number = ""
|
||||
|
||||
# kerberos
|
||||
self.kerberosMode = ""
|
||||
@ -357,6 +358,8 @@ Install options:
|
||||
self.g_opts.azName = ParaDict.get("az_name")
|
||||
if ParaDict.__contains__("security_mode"):
|
||||
self.g_opts.security_mode = ParaDict.get("security_mode")
|
||||
if ParaDict.__contains__("cluster_number"):
|
||||
self.g_opts.cluster_number = ParaDict.get("cluster_number")
|
||||
|
||||
def parseStop(self, ParaDict):
|
||||
"""
|
||||
|
@ -101,7 +101,7 @@ gs_dropnode = ["-?", "--help", "-V", "--version", "-U:", "-G:",
|
||||
# gs_om child branch
|
||||
gs_om_start = ["-t:", "-?", "--help", "-V", "--version", "-h:", "-I:",
|
||||
"--time-out=", "--az=", "-l:", "--nodeId=", "-D:",
|
||||
"--security-mode="]
|
||||
"--security-mode=", "--cluster-number="]
|
||||
gs_om_stop = ["-t:", "-?", "--help", "-V", "--version", "-h:", "-I:", "-m:",
|
||||
"--az=", "-l:", "--mode=", "--nodeId=", "--time-out=", "-D:"]
|
||||
gs_om_restart = ["-t:", "-?", "--help", "-V", "--version", "-h:", "-I:",
|
||||
@ -338,7 +338,8 @@ class Parameter():
|
||||
"--dbname": "dbname",
|
||||
"--dbuser": "dbuser",
|
||||
"--nodeId": "nodeId",
|
||||
"--security-mode": "security_mode"
|
||||
"--security-mode": "security_mode",
|
||||
"--cluster-number": "cluster_number"
|
||||
}
|
||||
parameterNeedValue_keys = parameterNeedValue.keys()
|
||||
|
||||
|
@ -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