In case of Hyper-v ssvm/cpvm reboot takes time so made changes to handle this

(cherry picked from commit 5bddebb8fc)
This commit is contained in:
sanjeev 2014-09-22 16:27:44 +05:30 committed by David Nalley
parent b771b6ee72
commit ce2fe3e5df
1 changed files with 7 additions and 3 deletions

View File

@ -208,12 +208,16 @@ def get_process_status(hostip, port, username, password, linklocalip, process, h
process)
# Double hop into router
timeout = 5
if str(hypervisor).lower() == 'hyperv':
timeout = 12
else:
timeout = 5
# Ensure the SSH login is successful
while True:
res = ssh.execute(ssh_command)
if res[0] != "Host key verification failed.":
if "Connection refused".lower() in res[0].lower():
pass
elif res[0] != "Host key verification failed.":
break
elif timeout == 0:
break