[FEATURE REQUEST] Restart Windows service that has dependencies #57987
Labels
Feature
new functionality including changes to functionality and code refactors, etc.
Milestone
Is your feature request related to a problem? Please describe.
When attempting to restart a Windows service that has components that are dependent on it, Salt will fail with the error:
ERROR: Failed To Stop winmgmt: A stop control has been sent to a service that other running services are dependent on.
Describe the solution you'd like
Similar to how Powershell handles this with the force flag, I would like Salt to handle the dependencies so the service can be restarted.
Describe alternatives you've considered
At the moment I am using cmd.run with a Powershell command:
Restart-Service winmgmt -Force
Additional context
WinMgmt isn't the service I'm trying to restart but it has dependencies and suffers the same issue. I've poked around win_service.py and I don't see the stop function handling the dependencies, and part of the error message doesn't live in that code, so it looks like this comes from win32serviceutil but that's as far as I can see.
Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.
The text was updated successfully, but these errors were encountered: