1. fix issue 设置参数logging_ollector参数为off,gs_om无法重启数据库
2. fix issue shared_buffers的默认值为1GB, 当服务器的物理内存较小时,会导致内存保护启用失效
This commit is contained in:
@ -88,14 +88,27 @@ class Kernel(BaseComponent):
|
|||||||
cmd += " -t %s" % time_out
|
cmd += " -t %s" % time_out
|
||||||
if security_mode == "on":
|
if security_mode == "on":
|
||||||
cmd += " -o \'--securitymode\'"
|
cmd += " -o \'--securitymode\'"
|
||||||
|
configFile = "%s/postgresql.conf" % self.instInfo.datadir
|
||||||
|
output = g_file.readFile(configFile, "logging_collector")
|
||||||
|
value = None
|
||||||
|
for line in output:
|
||||||
|
line = line.split('#')[0].strip()
|
||||||
|
if line.find('logging_collector') >= 0 and line.find('=') > 0:
|
||||||
|
value = line.split('=')[1].strip()
|
||||||
|
break
|
||||||
|
if value == "off":
|
||||||
|
cmd += " >/dev/null 2>&1"
|
||||||
self.logger.debug("start cmd = %s" % cmd)
|
self.logger.debug("start cmd = %s" % cmd)
|
||||||
(status, output) = subprocess.getstatusoutput(cmd)
|
(status, output) = subprocess.getstatusoutput(cmd)
|
||||||
if status != 0 or re.search("start failed", output):
|
if status != 0 or re.search("start failed", output):
|
||||||
raise Exception(ErrorCode.GAUSS_516["GAUSS_51607"] % "instance"
|
raise Exception(ErrorCode.GAUSS_516["GAUSS_51607"] % "instance"
|
||||||
+ " Error: Please check the gs_ctl log for "
|
+ " Error: Please check the gs_ctl log for "
|
||||||
"failure details." + "\n" + output)
|
"failure details." + "\n" + output)
|
||||||
if re.search("another server might be running", output):
|
if value == "off":
|
||||||
self.logger.log(output)
|
output = "[BACKEND] WARNING: The parameter logging_collector is " \
|
||||||
|
"set to off. The log will not be recorded to file. " \
|
||||||
|
"Please check any error manually."
|
||||||
|
self.logger.log(output)
|
||||||
|
|
||||||
def stop(self, stopMode="", time_out=300):
|
def stop(self, stopMode="", time_out=300):
|
||||||
"""
|
"""
|
||||||
|
@ -230,6 +230,9 @@ class OmImplOLAP(OmImpl):
|
|||||||
ErrorCode.GAUSS_536["GAUSS_53600"] % (cmd, output))
|
ErrorCode.GAUSS_536["GAUSS_53600"] % (cmd, output))
|
||||||
if re.search("another server might be running", output):
|
if re.search("another server might be running", output):
|
||||||
self.logger.log(output)
|
self.logger.log(output)
|
||||||
|
if re.search("] WARNING:", output):
|
||||||
|
tmp = '\n'.join(re.findall(".*] WARNING:.*", output))
|
||||||
|
self.logger.log(output[0:output.find(":")] + '\n' + tmp)
|
||||||
if startType == "cluster":
|
if startType == "cluster":
|
||||||
starttime = time.time()
|
starttime = time.time()
|
||||||
cluster_state = ""
|
cluster_state = ""
|
||||||
|
Reference in New Issue
Block a user