-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy minions reconnection #32918
Comments
Hey @cro, could you please have a look? I think it would be an interesting feature. |
Hi all, Any updates on this? I'm running into the same situation as Mircea where I go to run Salt against a number of salt-proxies only to find that some of them have dropped connections. This is especially problematic in a lab environment where hosts are up and down a good bit. |
Somehow I missed this issue. I've assigned it to myself so I don't lose track of it again. In recent versions of Salt we have added a number of tornado-based coroutines to help with things like this. We could probably leverage this functionality. @mirceaulinic were you thinking about a poll-based approach where if we try to ping the controlled device and it fails we go through the shutdown-reinit process? |
Yes something like that, but polling is more complicated than a ping - the underneath library should determine the connection state based on various parameters, e.g.: the SSH connection is still established, the device reachable et all, but the NETCONF session unusable because... the device decided so. And many other obscure situations like that. Therefore a ping would be a weak way to determine if the connection is still usable. def is_alive(opts):
return getattr(NETWORK_DEVICE.get('DRIVER'), 'alive_check')() Which basically calls the method If Does this make more sense? |
This has been implemented in #38829 |
Question
Currently the proxy minions connect to different devices through external libraries (such as SSH, NAPALM etc). The proxies are designed for long standing session -- the connection is open using the
init
function and closed callingshutdown
. There are cases when the connection is open correctly, the proxy remains connected for minutes/hours/days, but due to external factors, the connection is dropped (packet loss, or the device simply kills the process etc.). Is there a proper way to detect if the connection is still alive and instruct Salt to recall the functioninit
?Do you think that a function, say
is_alive
would be a good idea to be implemented in the Salt core and then customised like theinit
function, for example?Thank you!
The text was updated successfully, but these errors were encountered: