ciscoisesdk icon indicating copy to clipboard operation
ciscoisesdk copied to clipboard

Reconnect after rebooting to apply patch/update

Open mcgowanjt opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. For things like patch installs/rollbacks, the nodes have to restart. I am new to all of this, but I could not find a way to really check to retry the connection without setting a sleep timer and then just waiting and hoping it was back up by the time the sleep was up.

Describe the solution you'd like A way to check if you can connect or not. Function that would retry the connection until it succeeds or function that returns a bool or something that says it is possible to connect.

Describe alternatives you've considered I have tried to use a try/except block around creating a connection and then sleeping and trying again, but it sends a lot of exceptions that I could not figure out how to catch. They happen deeper down either in urllib3 or requests or the actual ciscoisesdk files. Again, I am not super good at all of this, so I may be doing it wrong.

mcgowanjt avatar Jun 28 '23 20:06 mcgowanjt

Hello @mcgowanjt, unfortunately, there is no endpoint or way to know when the restart has finished. You could, be consulted every X time the endpoint of get_version_info which is a simple one and when it responds correctly continue with the rest or a time sleep of about 10 mins approx.

bvargasre avatar Aug 17 '23 18:08 bvargasre

Hi @mcgowanjt

I'm going to close this issue, if you have another question feel free to create a new issue Regards

bvargasre avatar Jul 16 '24 20:07 bvargasre