@ -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():
|
||||
'''
|
||||
|
||||
@ -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],
|
||||
|
||||
@ -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("=========================================")
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user