!579 fix ssh互信异常没有捕获到

Merge pull request !579 from liuheng/fix
This commit is contained in:
opengauss_bot 2023-09-26 08:22:49 +00:00 committed by Gitee
commit 32ed5032a8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -821,7 +821,7 @@ General options:
cmd += '&& sed -i "$ s/$/ #OM/" %s ' % self.known_hosts_fname
cmd += "&& chmod %s %s" % (DefaultValue.KEY_FILE_MODE, self.known_hosts_fname)
(status, output) = subprocess.getstatusoutput(cmd)
if status != 0:
if status != 0 or "Name or service not known".lower() in output.lower():
raise Exception(ErrorCode.GAUSS_514["GAUSS_51400"] % cmd + " Error:\n%s" % output)
(status, output) = self.checkAuthentication(self.localHost)
if not status: