Merge "set timeout for paramiko ssh connection"
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -38,3 +38,4 @@ POWERVM_MIN_MEM = 512
|
||||
POWERVM_MAX_MEM = 1024
|
||||
POWERVM_MAX_CPUS = 1
|
||||
POWERVM_MIN_CPUS = 1
|
||||
POWERVM_CONNECTION_TIMEOUT = 60
|
||||
|
||||
Reference in New Issue
Block a user