nautobot / nautobot-app-device-onboarding

Device Onboarding Plugin for Nautobot
https://docs.nautobot.com/projects/device-onboarding/en/latest/
Other
44 stars 31 forks source link

When an auth or timeout failure happens each subtask still runs #255

Open jeffkala opened 1 month ago

jeffkala commented 1 month ago

Environment

Expected Behavior

Might be solved by a connectivity check; however, if a timeout happens on the first command execution for timeout or auth failure all subsequent commands shouldn't be attempted as it causes unnecessary failures and login attempts.

Observed Behavior

If auth fails, it tries to login and run show version, and then even if auth fails on the first command it does the same for the remaining commands.

Steps to Reproduce

  1. Run sync devices job on with purposefully bad credentials
  2. Will see the same auth failure occur for every command.

Probably makes sense here to add a connecitivyt check + logic to say if the first command fails with (timeout, auth) to stop and don't runn the other commands.

Potentially create our own connection handling on the nornir side.