环境变量写入前预清理
This commit is contained in:
parent
ea4d53c2f0
commit
05966d11ac
@ -3358,11 +3358,11 @@ class dbClusterInfo():
|
||||
output : NA
|
||||
"""
|
||||
# get backIp
|
||||
dbNode.backIps = self.__readNodeIps(dbNode.name, "backIp")
|
||||
dbNode.backIps = self.compress_ips(self.__readNodeIps(dbNode.name, "backIp"))
|
||||
if (len(dbNode.backIps) == 0):
|
||||
raise Exception(ErrorCode.GAUSS_512["GAUSS_51207"] % dbNode.name)
|
||||
# get sshIp
|
||||
dbNode.sshIps = self.__readNodeIps(dbNode.name, "sshIp")
|
||||
dbNode.sshIps = self.compress_ips(self.__readNodeIps(dbNode.name, "sshIp"))
|
||||
if (len(dbNode.sshIps) == 0):
|
||||
dbNode.sshIps = dbNode.backIps[:]
|
||||
# get virtualIp
|
||||
|
@ -167,7 +167,7 @@ class InstallImpl:
|
||||
hostname = syncNode
|
||||
if syncNumFirst and syncNum != -1:
|
||||
raise Exception(ErrorCode.GAUSS_530["GAUSS_53011"] %
|
||||
"syncNode_hostname and dataNode1 cannot be exist at the same time")
|
||||
"syncNode_hostname and dataNode1_syncNum cannot be exist at the same time")
|
||||
|
||||
if syncNumFirst and syncNum == -1:
|
||||
syncNumFirstRe = re.sub('[,\s]', '', syncNumFirst)
|
||||
|
@ -1656,6 +1656,8 @@ Common options:
|
||||
FileUtil.deleteLine(userProfile, "^\\s*export\\s*PGDATA*")
|
||||
# clean PGPORT
|
||||
FileUtil.deleteLine(userProfile, "^\\s*export\\s*PGPORT*")
|
||||
# clean IP_TYPE
|
||||
FileUtil.deleteLine(userProfile, "^\\s*export\\s*IP_TYPE*")
|
||||
# clean PGDATABASE
|
||||
FileUtil.deleteLine(userProfile, "^\\s*export\\s*PGDATABASE*")
|
||||
# clean LD_LIBRARY_PATH
|
||||
@ -1677,7 +1679,7 @@ Common options:
|
||||
"^\\s*export\\s*PATH=\\$PATH:\\$GPHOME\\/script\\/gspylib\\"
|
||||
"/pssh\\/bin:\\$GPHOME\\/script$")
|
||||
FileUtil.deleteLine(userProfile,
|
||||
"^\\s*export\\s*PATH=\\$PATH:\\/root\\/gauss_om\\/%s\\"
|
||||
"^\\s*export\\s*PATH=\\$PATH:\\/home\\/%s\\/gauss_om\\"
|
||||
"/script$" % self.user)
|
||||
FileUtil.deleteLine(userProfile,
|
||||
"^\\s*export\\s*PATH=\\$GPHOME\\/pssh-2.3.1\\/bin:"
|
||||
@ -1686,7 +1688,7 @@ Common options:
|
||||
"^\\s*export\\s*PATH=\\$GPHOME\\/script\\/gspylib\\"
|
||||
"/pssh\\/bin:\\$GPHOME\\/script:\\$PATH$")
|
||||
FileUtil.deleteLine(userProfile,
|
||||
"^\\s*export\\s*PATH=\\/root\\/gauss_om\\/%s\\"
|
||||
"^\\s*export\\s*PATH=\\/home\\/%s\\/gauss_om\\"
|
||||
"/script:\\$PATH$" % self.user)
|
||||
self.logger.debug("Deleting crash PATH in user environment variables.")
|
||||
# clean PYTHONPATH
|
||||
|
Loading…
x
Reference in New Issue
Block a user