salt icon indicating copy to clipboard operation
salt copied to clipboard

[master] Make sure the root minion process handles SIGUSR1

Open max-arnold opened this issue 1 year ago • 5 comments

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

max-arnold avatar Feb 19 '24 09:02 max-arnold

we are going to need a test on this. just something that tests the process does do what is expected for sigusr1

whytewolf avatar Feb 19 '24 20:02 whytewolf

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

max-arnold avatar Feb 20 '24 03:02 max-arnold

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.

whytewolf avatar Feb 20 '24 03:02 whytewolf

@max-arnold Is this not a bugfix that should go into 3006.x?

dwoz avatar Feb 26 '24 20:02 dwoz

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

max-arnold avatar Feb 26 '24 23:02 max-arnold