Closed andyb2000 closed 1 year ago
@andyb2000 You shouldn't use use_timing=True
for long-running commands it is not reliably. So you should set that to false and then set read_timeout=n
(where n is how long the command takes to run plus some margin that provides sufficient headroom for variation in the response from the device).
Ahh, excellent, yes I'm now getting back data from my test script. Thanks @ktbyers I'll close this.
Hi, Whilst this is under a netbox dev area, I don't believe it's netbox specific, using a basic debug script, calling "admin show inventory" on a Cisco ASR-9010 I get no output at all from NORNIR, nor does anything appear in logs/debugging that would point to blank output.
nornir debug log output:
Running task 'multiple_tasks' with args {} on 1 hosts Host 'x.x.x.x': running task 'multiple_tasks' Host 'x.x.x.x': running task 'admin show inventory'
Actual output: `{'defaults': {'connection_options': {}, 'data': {}, 'hostname': None, 'password': None, 'platform': None, 'port': None, 'username': None}, 'groups': {'all': {'connection_options': {}, 'data': {}, 'groups': [], 'hostname': None, 'name': 'all', 'password': None, 'platform': None, 'port': None, 'username': None}, 'cisco_ios': {'connection_options': {}, 'data': {}, 'groups': [], 'hostname': None, 'name': 'cisco_ios', 'password': None, 'platform': None, 'port': None, 'username': None}, 'cisco_xr': {'connection_options': {}, 'data': {}, 'groups': [], 'hostname': None, 'name': 'cisco_xr', 'password': None, 'platform': None, 'port': None, 'username': None}, 'site-x1': {'connection_options': {}, 'data': {}, 'groups': [], 'hostname': None, 'name': 'site-xxx', 'password': None, 'platform': None, 'port': None, 'username': None}}, 'hosts': {'x.x.x.x': {'connection_options': {'netmiko': {'extras': {}, 'hostname': None, 'password': None, 'platform': None, 'port': None, 'username': None}}, 'data': {'site': 'x1', 'site_id': 107}, 'groups': ['cisco_xr', 'site-x1'], 'hostname': 'x.x.x.x', 'name': 'x.x.x.x', 'password': 'mypass', 'platform': 'cisco_xr', 'port': 22, 'username': 'myuser'}}} multiple_tasks**^^^^ END multiple_tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `
CODE: