[3008.x] Preserve EventPublisher setproctitle across MasterPubServerChannel respawns - #70126
Open
dwoz wants to merge 1 commit into
Open
Conversation
…spawns 3008.x forward-port of saltstack#70124. ProcessManager.restart_process drops the name= kwarg, so after respawn the process title falls back to the __qualname__. Set the title explicitly at the top of _publish_daemon so initial fork and every respawn both show "EventPublisher".
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.
Summary
3008.x forward-port of #70124.
ProcessManager.restart_processdrops thename=kwarg passed toadd_process(name="EventPublisher"), so after any respawn the process title falls back to the__qualname__MasterPubServerChannel._publish_daemon. grep/pgrep/log correlation onEventPublishersilently breaks the first time the daemon is restarted.Fix sets the process title explicitly at the top of
_publish_daemonso initial fork and every respawn both showEventPublisher. Thename="EventPublisher"kwarg onadd_processis intentionally kept so the historical label still appears on initial fork.Sibling of #70111 (same bug pattern,
FileserverUpdate).Test plan
tests/pytests/unit/channel/test_server.py::test_publish_daemon_sets_eventpublisher_process_title.salt/channel/server.pyon 3008.x and passes with the fix applied.pre-commitclean on all changed files.test:fulllabel applied).