Skip to content

Commit

Permalink
Fix netconf connection command timeout issue (ansible#58322)
Browse files Browse the repository at this point in the history
*  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.
  • Loading branch information
ganeshrn authored and pabelanger committed Jun 26, 2019
1 parent 4591a30 commit db0fe4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ansible/plugins/connection/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ def _connect(self):
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:
Expand Down

0 comments on commit db0fe4b

Please sign in to comment.