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:
parent
4591a300ae
commit
db0fe4b188
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue