Commit 15b3130e authored by 金凯强's avatar 金凯强 🎨

校验出错修正

parent 293740e0
Pipeline #21409 passed with stage
in 48 seconds
......@@ -194,6 +194,6 @@ class InstallService(HSBaseUCService):
'''
out, err = ssh.exec_command('docker -v')
if 'Docker version' in out or err:
if 'Docker version' in out or 'Docker version' in err:
logger.info('docker安装失败')
raise HSException('远端服务器已经安装docker,不需要重新安装')
......@@ -503,7 +503,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
'''
out, err = ssh.exec_command('docker -v')
if 'Docker version' not in out or err:
if 'Docker version' not in out or 'Docker version' not in err:
logger.info('验证远端服务器是否安装docker日志:{}'.format(err))
logger.info('远程升级失败')
raise HSException('远端服务器未安装docker,请先安装后再升级')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment