Thursday, October 3, 2019

Netmiko ASA Failover Issues

Hello everyone. I've run into a roadblock with creating my own "in service" upgrade software script in python, and I'm hoping someone has already solved this problem:

Whenever it is time for me to send a forced failover to an ASA HA pair (in this case it is active-passive), I am able to fail over the device, the script will hang until the default timeout period has expired. When that happens, my whole script quits. This part I understand because when you send the command failover exec standby failover active the ssh connection will break, which is expected. I've tried breaking the connection with the net_connect.disconnect() function after sending the command, but of course it cannot get that far. Netmiko is stuck trying to look for the prompt when the ssh connection is broken. I should mention telling the ASA to reboot and force a failover is not desired as there is a large (10s) delay in handing over services to the secondary.

The end goal is to have my script continue with a new ssh connection. The workaround I thought of for this is to break up the upgrade process into multiple scripts, but that isn't really a fix. Source is here if anyone is interested (please excuse the formatting, it's not finalized).

Edit: I've solved the problem in the comments.



No comments:

Post a Comment