Fix netconf connection command timeout issue (#58322)

*  ncclient uses same timeout value at the time
   of connection initialisation and waiting response
*  Ansible has connect_timeout to control the waiting
   time during initial connection and `command_timeout`
   to control the wait time for resposne. Hence set the
   ncclient timeout seperately to Ansible command_timeout
   after the connection object is created sucessfully.
This commit is contained in:
Ganesh Nalawade 2019-06-26 21:23:07 +05:30 committed by Paul Belanger
parent 4591a300ae
commit db0fe4b188

View file

@ -321,6 +321,8 @@ class Connection(NetworkConnectionBase):
timeout=self.get_option('persistent_connect_timeout'),
ssh_config=self._ssh_config
)
self._manager._timeout = self.get_option('persistent_command_timeout')
except SSHUnknownHostError as exc:
raise AnsibleConnectionFailure(to_native(exc))
except ImportError as exc: