Merged
Conversation
added 4 commits
March 22, 2016 03:56
* Improve minion.kill for use by minion.restart
+ Add "retcode" status
+ Wait until the process dies (add timeout value)
+ Provide meaningful "comment" information when appropriate
* Add minion.restart: kills minion with minion.kill and then starts a new minion process
+ Can provide a specific ``minion_restart_command`` arg vector in minion configuration
+ If no ``minion_restart_command`` is available then uses ``argv`` of current process
+ If minion is not daemonized then it will kill but not restart - allows for
direct management of minion by init, systemd or other direct process
manager.
* Add EX_TEMPFAIL to exitcodes for timeout situtations (used by minion.kill)
TODO: integration tests
Contributor
Author
|
@cachedout, here it is - rebased. |
Contributor
|
This is really solid. Well done, sir! |
Contributor
Author
|
@cachedout, thanks. More solid once it has integration tests. ;-) |
Contributor
|
@plastikos For sure. This is an excellent start though. |
Contributor
|
Will this feature be useful in highstate runs? Like, if I have some helper state: And another one for applying some configuration for minion: Will minion.restart allow to finish current Will it be kinda "atomic", meaning that current execution module (in my case state.highstate/apply) is successfully finished, bet no new execution modules will be started until restart, so nothing will be canceled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
It restarts the minion (adds minion.restart command)
See #32545 and #32040
What issues does this PR fix or reference?
No easy way to remotely kill/restart minion.
Tests written?
No - will be added once #32025 is merged. New feature won't break existing uses.