!580 增加A5检查项报错信息

Merge pull request !580 from zhangao/master_A5
This commit is contained in:
opengauss_bot 2023-09-27 06:48:19 +00:00 committed by Gitee
commit d91a0fb1f1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 7 additions and 7 deletions

View File

@ -288,7 +288,8 @@ class ErrorCode():
"the actual memory.",
'GAUSS_50501': "[GAUSS-50501] : Shared_buffers must be less than "
"shmmax. Please check it.",
'GAUSS_50502': "[GAUSS-50502] : Failed to obtain %s information."
'GAUSS_50502': "[GAUSS-50502] : Failed to obtain %s information.",
'GAUSS_50503': "[GAUSS-50503] : %s, program exists abnormally."
}
###########################################################################

View File

@ -1359,8 +1359,6 @@ class PreinstallImpl:
if found_enabledss:
with open(source_file, "w") as file:
file.writelines(file_lines)
else:
return
def checkRepeat(self):
"""

View File

@ -455,8 +455,6 @@ class UninstallImpl:
if self.mpprcFile and os.path.isfile(self.mpprcFile):
source_file = self.mpprcFile
else:
source_file = os.path.join("/etc", "profile")
if is_dsshome and not is_enabledssset:
with open(source_file, 'a') as file:

View File

@ -1995,8 +1995,11 @@ def CheckMemInfo():
input : NA
output : NA
"""
memdata = collectMemInfo()
swapdata = collectSwapInfo()
try:
memdata = collectMemInfo()
swapdata = collectSwapInfo()
except SystemExit as e:
raise Exception(ErrorCode.GAUSS_505["GAUSS_50503"] % e)
if (swapdata.swapvalue > memdata.memvalue):
g_logger.log("SwapMemory %s TotalMemory %s" % (swapdata.swapvalue,
memdata.memvalue))