Skip to content

Systemd service no block handling for salt-minion service #68212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 3006.x
Choose a base branch
from

Conversation

barneysowood
Copy link
Collaborator

@barneysowood barneysowood commented Jul 24, 2025

What does this PR do?

Modifies systemd_service.{restart,stop} to default to using no_block=True when the service being stopped or restarted is the salt-minion.

If you don't pass no_block=True, the minion blocks waiting for systemd to restart the service, while systemd is waiting for the minion to exit. Eventually, after systemd hits its timeout (defaulting to 90secs) it will kill the salt minion processes.

Behaviour for other services should remain the same and the functions will still honour the value of no_block if passed as an argument.

When combined with #68209 this should lead to a much better default behaviour when calling service.restart on the salt-minion service.

Previous Behavior

When calling service.restart or service.stop on the salt-minion service, you would have to add no_block=True otherwise the salt-minion service and system would deadlock until systemd eventually killed the minion processes.

New Behavior

If called on the salt-minion service, service.restart and service.stop default to no_block=True. For other services, default remains no_block=False

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with SSH key?

Yes

Modifies systemd_service.{restart,stop} to default to using
no_block=True when the service being stopped or restarted is the
salt-minion.

If you don't pass no_block, the minion blocks waiting for systemd to
restart the service, while systemd is waiting for the minion to exit.
Eventually, after systemd hits its timeout it will kill the salt minion
processes.

Behaviour for other services should remain the same and the functions
will still honour the value of no_block if passed as an argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants