!80 cm安装与数据库升级解耦适配3.0.0

Merge pull request !80 from 薛蒙恩/split_sp300
This commit is contained in:
opengauss-bot 2022-12-12 11:17:19 +00:00 committed by Gitee
commit cb69761038
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 10 additions and 4 deletions

View File

@ -101,7 +101,7 @@ class InstallImpl:
status, output = subprocess.getstatusoutput(getCMVersionCmd)
if status != 0:
self.logger.logExit("Failed to get CM pacakage version.")
cmVersionList = re.findall(r'openGauss CM (\d.*\d) build', output)
cmVersionList = re.findall(r'.*CM (\d.*\d) build', output)
if len(cmVersionList) == 0:
self.logger.logExit("Failed to get CM pacakage version.")
cmVersion = cmVersionList[0]
@ -230,11 +230,11 @@ class InstallImpl:
# set crontab on localhost
status, output = subprocess.getstatusoutput(setCronCmd)
os.remove(cronContentTmpFile)
if status != 0:
self.logger.debug("Command: " + setCronCmd)
errorDetail = "\nStatus: %s\nOutput: %s" % (status, output)
self.logger.logExit(ErrorCode.GAUSS_508["GAUSS_50801"] + errorDetail)
os.remove(cronContentTmpFile)
status, output = subprocess.getstatusoutput(killMonitorCmd + startMonitorCmd)
if status != 0:

View File

@ -185,7 +185,12 @@ General options:
if status != 0:
self.logger.logExit((ErrorCode.GAUSS_514["GAUSS_51400"] % cmd) + \
"\nStatus:%d\nOutput:" + output)
nodesStaticInfo = re.split("=+", output)[1:]
nodesStaticInfoStr = re.split("azName.*:.*", output)
if len(nodesStaticInfoStr) == 0:
self.logger.logExit("Failed to get cluster info from static file.")
if len(nodesStaticInfoStr) < 2:
self.logger.logExit("CM is not supported in single instance.")
nodesStaticInfo = nodesStaticInfoStr[1:]
for nodeInfo in nodesStaticInfo:
if nodeInfo == "":
continue

View File

@ -145,7 +145,8 @@ General options:
cmd = """
crontab -l > {cronContentTmpFile};
sed '/.*om_monitor.*/d' {cronContentTmpFile} -i;
crontab {cronContentTmpFile}
crontab {cronContentTmpFile} &&
rm -f {cronContentTmpFile}
""".format(cronContentTmpFile=cronContentTmpFile)
for host in self.hostnames:
isLocal = False