Merge "set timeout for paramiko ssh connection"

This commit is contained in:
Jenkins
2013-04-10 20:52:08 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import paramiko
from nova import exception as nova_exception
from nova.openstack.common import log as logging
from nova import utils
from nova.virt.powervm import constants
from nova.virt.powervm import exception
LOG = logging.getLogger(__name__)
@@ -53,7 +54,8 @@ def ssh_connect(connection):
username=connection.username,
password=connection.password,
port=connection.port,
key_filename=connection.keyfile)
key_filename=connection.keyfile,
timeout=constants.POWERVM_CONNECTION_TIMEOUT)
return ssh
except Exception:
LOG.exception(_('Connection error connecting PowerVM manager'))

View File

@@ -38,3 +38,4 @@ POWERVM_MIN_MEM = 512
POWERVM_MAX_MEM = 1024
POWERVM_MAX_CPUS = 1
POWERVM_MIN_CPUS = 1
POWERVM_CONNECTION_TIMEOUT = 60