!170 om 修改适配

Merge pull request !170 from gyt0221/master
This commit is contained in:
opengauss-bot
2020-09-02 15:31:43 +08:00
committed by Gitee
5 changed files with 23 additions and 2 deletions

View File

@ -4086,6 +4086,15 @@ class DefaultValue():
logger.debug(
"Successfully clear $WHITELIST_ENV in %s." % mpprcFile)
@staticmethod
def checkDockerEnv():
cmd = "egrep '^1:.+(docker|lxc|kubepods)' /proc/1/cgroup"
(status, output) = subprocess.getstatusoutput(cmd)
if output:
return True
else:
return False
class ClusterCommand():
'''

View File

@ -199,6 +199,9 @@ class DN_OLAP(Kernel):
tmpDNDict["synchronous_standby_names"] = "'ANY %d(%s)'" % \
(syncNum,
azNames[0])
elif syncNum == 0:
tmpDNDict["synchronous_standby_names"] = "'ANY 1(%s)'" % \
(azNames[0])
elif (len(azNames) == 2 and len(peerInsts) == 3):
tmpDNDict["synchronous_standby_names"] = "'ANY 2(%s,%s)'" % \
(azNames[0],

View File

@ -242,7 +242,7 @@ class OmImplOLAP(OmImpl):
else:
break
if time.time() > time_out + starttime:
raise Exception(ErrorCode.GAUSS_516["GAUSS_51610"] % "cluster"
raise Exception(ErrorCode.GAUSS_516["GAUSS_51607"] % "cluster"
+ "Start timeout, please check the process"
" status manually")
self.logger.log("=========================================")

View File

@ -1867,7 +1867,8 @@ class PreinstallImpl:
self.createDirs()
# set Sctp
self.setSctp()
if not DefaultValue.checkDockerEnv():
self.setSctp()
# set os parameters
self.setAndCheckOSParameter()
# prepare cron service for user

View File

@ -46,6 +46,12 @@ actioItemMap = {
"Set_FileSystem_Configure": ['/etc/security/limits.conf', True]
}
docker_no_need_check = ["net.core.wmem_max", "net.core.rmem_max",
"net.core.wmem_default",
"net.core.rmem_default", "net.sctp.sctp_mem",
"net.sctp.sctp_rmem", "net.sctp.sctp_wmem",
"net.core.netdev_max_backlog"]
paraList = {}
#############################################################################
@ -224,6 +230,8 @@ def checkSysctlParameter(kernelParameter, isSet):
if (platform.machine() == "aarch64"
and key == "net.ipv4.tcp_tw_recycle"):
continue
if (DefaultValue.checkDockerEnv() and key in docker_no_need_check):
continue
# The parameter sctpchecksumerrors check method is independent
if (key == "sctpchecksumerrors"):
cmd = "cat /proc/net/sctp/snmp | grep SctpChecksumErrors" \