You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating simple "shim" tasks for NETCONF fails in Nornir 2.4.0 but works in Nornir 2.3.0. This seems more like a lower level Nornir connection/option handling problem than a NETCONF problem.
Nornir 2.4.0 appears to require an SSH config file and fails.
(pspynet) [centos@devbox nornir_nc_issue]$ pip list | grep nornir
nornir 2.4.0
(pspynet) [centos@devbox nornir_nc_issue]$ python get_runbook.py
Traceback (most recent call last):
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/nornir/core/task.py", line 85, in start
r = self.task(self, **self.params)
File "get_runbook.py", line 7, in netconf_get_config
conn = task.host.get_connection("netconf", task.nornir.config)
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/nornir/core/inventory.py", line 302, in get_connection
extras=conn.extras,
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/nornir/core/inventory.py", line 352, in open_connection
configuration=configuration,
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/nornir/plugins/connections/netconf.py", line 118, in open
connection = manager.connect_ssh(**parameters)
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/ncclient/manager.py", line 143, in connect_ssh
session.connect(*args, **kwds)
File "/home/centos/environments/pspynet/lib/python3.7/site-packages/ncclient/transport/ssh.py", line 355, in connect
with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj:
FileNotFoundError: [Errno 2] No such file or directory: '/home/centos/.ssh/config'
To make this issue easy to replicate, you can use the Cisco DevNet sandbox for quick tests using the script and inventory file provided in this issue. If this behavior is expected (ie, that Nornir will now be requiring these SSH config files), I would appreciate a link to the release notes or documentation explaining it. I wasn't able to find anything after searching.
The text was updated successfully, but these errors were encountered:
Basically there was an earlier bug...that needed fixed that was hiding this other problem.
Given the behavior of ncclient, it probably makes sense to validate that ~/.ssh/config actually exists before passing it in as an argument to ncclient.
Creating simple "shim" tasks for NETCONF fails in Nornir 2.4.0 but works in Nornir 2.3.0. This seems more like a lower level Nornir connection/option handling problem than a NETCONF problem.
Nornir runbook:
Inventory file:
Everything works on Nornir 2.3.0 without issue.
Nornir 2.4.0 appears to require an SSH config file and fails.
To make this issue easy to replicate, you can use the Cisco DevNet sandbox for quick tests using the script and inventory file provided in this issue. If this behavior is expected (ie, that Nornir will now be requiring these SSH config files), I would appreciate a link to the release notes or documentation explaining it. I wasn't able to find anything after searching.
The text was updated successfully, but these errors were encountered: