Change service shutdown timeouts for salt-minion service (Windows) #42913
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Windows default for stopping a service is 30 seconds. This changes the
default timeouts for the salt-minion service to more closely resemble
how it is handled in Windows. This gives Python a chance to cleanly exit
before being forcibly closed.
Also removes the line that wipes out the minion cache. This was added years ago when there was a problem upgrading from an old version of Salt. It no longer applies.
What issues does this PR fix or reference?
#42861 (comment)
#38590
Previous Behavior
A ctrl+c shutdown was generated and timed out after 1.5 seconds, then a WM_CLOSE was generated, followed by WM_QUIT, each with a 1.5-second timeout. Finally, the process is just terminated. Giving python about 4.5 seconds to exit cleanly.
New Behavior
Ctrl+c is issued with a 24 sec timeout, followed by WM_CLOSE with a 2-second timeout, then WM_QUIT with a 1.5-second timeout. Finally, the process is terminated. This gives Python 27.5 seconds to exit cleanly.
Tests written?
NA