@ -321,9 +321,9 @@ if __name__ == "__main__":
|
||||
dropNode.initLogs()
|
||||
dropNode.check_repeat_process()
|
||||
dropNode.checkParameters()
|
||||
dropNode.check_cluster_status()
|
||||
dropNode.flagForOnlyPrimaryLeft()
|
||||
dropNode.checkConnection(list(dropNode.backIpNameMap.keys()),
|
||||
dropNode.envFile)
|
||||
dropNode.check_cluster_status()
|
||||
dropNode.flagForOnlyPrimaryLeft()
|
||||
dropNodeImpl = DropnodeImpl(dropNode)
|
||||
dropNodeImpl.run()
|
||||
|
@ -1126,9 +1126,9 @@ class ErrorCode():
|
||||
"missing in the command.",
|
||||
"GAUSS_35802": "[GAUSS-35802] The IP list of target node: %s"
|
||||
"is not in the current cluster. Please check!",
|
||||
"GAUSS_35803": "[GAUSS-35803] The IP of primary node %s is in the "
|
||||
"GAUSS_35803": "[GAUSS-35803] The IP of local host %s is in the "
|
||||
"target node list. \n"
|
||||
"The primary node can not be dropped! \n",
|
||||
"Can not drop local host!\n",
|
||||
"GAUSS_35804": "[GAUSS-35804] The dropnode operation can only be executed"
|
||||
" at the primary node. \n ",
|
||||
"GAUSS_35805": "[GAUSS-35805] Input %s. Operation aborted. ",
|
||||
@ -1136,7 +1136,7 @@ class ErrorCode():
|
||||
"It doesn't meet the requirement.! ",
|
||||
"GAUSS_35807": "[GAUSS-35807] The host %s which still exist in the "
|
||||
"cluster can't be connected.\n"
|
||||
"It doesn't meet the requirement.! ",
|
||||
"It doesn't meet the requirement! ",
|
||||
"GAUSS_35808": "[GAUSS-35808] The %s is running switchover/failover!\n"
|
||||
"The dropnode operation can only be executed when there is"
|
||||
" no such operation!",
|
||||
|
@ -465,7 +465,7 @@ class OperCommon:
|
||||
"""
|
||||
self.logger.log(
|
||||
"[gs_dropnode]Start to parse parameter config file on %s." % host)
|
||||
resultDict = {'replStr': '', 'syncStandbyStr': '', 'pghbaStr': ''}
|
||||
resultDict = {'replStr': '', 'syncStandbyStr': '*', 'pghbaStr': ''}
|
||||
pgConfName = os.path.join(dirDn, 'postgresql.conf')
|
||||
pghbaConfName = os.path.join(dirDn, 'pg_hba.conf')
|
||||
|
||||
@ -527,7 +527,9 @@ class OperCommon:
|
||||
output_dn_nospace = list_output1
|
||||
init_no -= 1
|
||||
count_dn += 1
|
||||
if count_dn == 0 or list_output1 == '':
|
||||
if count_dn == 0:
|
||||
return output_result
|
||||
if list_output1 == '':
|
||||
return ''
|
||||
if list_output1 != '*':
|
||||
output_result = output.replace(output_dn, list_output1)
|
||||
@ -601,7 +603,7 @@ class OperCommon:
|
||||
sqlvalue += "ALTER SYSTEM SET replconninfo%s = '%s';" % (
|
||||
i, replValue[:-1].split('|')[count])
|
||||
count += 1
|
||||
if not singleLeft and syncStandbyValue != '':
|
||||
if not singleLeft and syncStandbyValue != '*':
|
||||
sqlvalue += "ALTER SYSTEM SET synchronous_standby_names = '%s';" \
|
||||
% syncStandbyValue
|
||||
if singleLeft:
|
||||
|
Reference in New Issue
Block a user