Repository navigation
Do not fail service.dead/service.disabled for services that are not present - #70654
Open
LakshmikanthRaju wants to merge 1 commit into
Conversation
avinashbhatv
reviewed
Nov 4, 2026
LakshmikanthRaju
force-pushed
the
fix/70396-service-dead-disabled-missing-service/3008.x
branch
from
November 5, 2026 04:37
75a79b5 to
c9251aa
Compare
…resent A service that is not present is by definition neither running nor enabled, so these states should pass. - add salt.exceptions.ServiceNotFoundError (a CommandExecutionError) - systemd_service and mac_service raise it when the service does not exist; service.dead and service.disabled treat it as "not present". Other errors (offline mode, daemon-reload failure) still fail - service.dead now passes in test mode too, matching service.disabled - systemd_service._check_available returns False on exit status 4 when the systemd version is unknown and the output cannot be parsed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LakshmikanthRaju
force-pushed
the
fix/70396-service-dead-disabled-missing-service/3008.x
branch
from
November 5, 2026 05:30
c9251aa to
141cc82
Compare
This branch was previously deployed
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?
Do not fail service.dead/service.disabled for services that are not present
A service that is not present is by definition neither running nor enabled, so these states should pass.
What issues does this PR fix or reference?
Fixes #70396
Previous Behavior
When specifying state service.dead/service.disabled with a service that is not present on the system, the state will fail.
New Behavior
Do not fail service.dead/service.disabled for services that are not present
Testing
Upgrade salt and ran the below commands to test the fix
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes/No