nornir-automation / nornir

Pluggable multi-threaded framework with inventory management to help operate collections of devices
https://nornir.readthedocs.io/
Apache License 2.0
1.4k stars 237 forks source link

Set timeout if i use inventory plugin #772

Closed Sivolen closed 2 years ago

Sivolen commented 2 years ago

Hi! I use inventory plugin, but i don't understand how to set timeout for ssh connection. I have an error:

netmiko.ssh_exception.NetmikoTimeoutException: Paramiko: 'No existing session' error: try increasing 'conn_timeout' to 10 seconds or larger.

config.yaml

# groups file
inventory:
#  plugin: NBInventory2
  plugin: NetBoxInventory2
  options:
    defaults_file: "defaults.yaml"
    nb_url: 'https://10.0.2.18'
    nb_token: ' key'
    ssl_verify: False
    use_slugs: True
    flatten_custom_fields: True
    use_platform_napalm_driver: True
    filter_parameters:
        role: ["cs"]
defaults.yaml

connection_options:
  paramiko:
    extras:
      timeout: 10
  netmiko:
    extras:
     conn_timeout: 10
dbarrosop commented 2 years ago

not an issue, and you already opened a discussion