commit
cb69761038
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user