修改状态查询UnKnown条件bug

This commit is contained in:
Racardo.Cui
2021-03-16 23:16:40 +08:00
parent 3513b4f0da
commit 783639cfa4

View File

@ -1647,7 +1647,7 @@ class dbClusterInfo():
(statusMap, output) = sshtool.getSshStatusOutput(
sshcmd, [dbNode.name], mpprcFile)
if statusMap[dbNode.name] != 'Success' or \
output.find("exc_sql failed"):
output.find("exc_sql failed") > 0:
if output.find(
"could not connect to the local server") \
> 0 or output.find(
@ -1664,7 +1664,7 @@ class dbClusterInfo():
dbState = res[0]
else:
(status, output) = subprocess.getstatusoutput(sshcmd)
if status != 0 or output.find("exc_sql failed"):
if status != 0 or output.find("exc_sql failed") > 0:
if output.find(
"could not connect to the local server") \
> 0 or output.find(