Master loses connectivity to Windows minions after restart
I have had a few occasions when my master was restarted accidentally, through reboots, etc. When that happens, the next salt command that I run seems to skip most of my windows minions. Salt -v '*' test.ping will show that most of the windows fail. If I connect to a minion a run a salt-call state.highstate or test.ping, it is successful.
Restarting the windows minion service does not fix the problem. The service seems to be dependent on the windows RPC service which can not be restarted. Rebooting the windows server always fixes the problem.
Once a master has lost connection to a minion, I have never been able to restore functionality without a reboot of the windows minion. Clearing the cache or resetting the salt-keys on the master has not helped.
The windows firewall is disabled on all of my systems.
Thanks for creating this. Hopefully we can solve this issue.
The issue seemed to be related to not respecting the timeout in the config file. The default timeout is 10 seconds. For windows to respond I raised the timeout to 60 seconds. This was not being respected. If I run salt commands with a -t 60 more minions respond. With -t 90 even more, and -t 120 almost all.
Ah, yes, this is actually a known issue in windows (related to multiprocessing if I remember correctly) which results in the minions being unable to respond to the master's requests for updates on the current job (so the master thinks they are no longer running the job and returns). Ideally, you should set the timeout longer than the total time you expect the job to take. (Many people just use -t 300 for everything)
This is fixed in later versions of the windows salt-minion.