salt
salt copied to clipboard
[master] Make sure the root minion process handles SIGUSR1
What does this PR do?
Makes the root minion process handle SIGUSR1 as described here https://docs.saltproject.io/en/latest/topics/troubleshooting/minion.html#live-python-debug-output
What issues does this PR fix or reference?
References: https://github.com/saltstack/salt/pull/1241
Previous Behavior
Minion dies:
kill -USR1 $(pgrep -fw salt-minion | head -1)
salt-minion
zsh: user-defined signal 1 salt-minion
[ERROR ] Minion process encountered exception: [Errno 3] No such process
New Behavior
Sending SIGUSR1 prints a traceback
Merge requirements satisfied?
- [ ] Docs - covered by existing ones
- [x] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
- [x] Tests - not sure how to write one. Any hints?
Commits signed with GPG?
No
we are going to need a test on this. just something that tests the process does do what is expected for sigusr1
Added a test, but I do not like it because it might be flaky (a master traceback file is not generated reliably). Let's see how it runs on CI
Added a test, but I do not like it because it might be flaky (a master traceback file is not generated reliably). Let's see how it runs on CI
I can see that. it might be fine. one thing. i believe we are still testing on 3.9 in our tests. as such glob.glob doesn't have root_dir yet. hence the lint error.
@max-arnold Is this not a bugfix that should go into 3006.x?
Strictly speaking it is a bugfix, but it is up to you to decide on the target branch. The fix is not critical, and the feature is quite obscure. Personally I would pick 3007 as the target branch
I can rebase it against any branch you prefer