[FEATURE REQUEST] Allow starting not enabled services on Windows minions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Hi,
I have a case where service MUST be started manually and 'enable: True' is not a solution.
As a temporary workaround I used modules:
{# Waiting for investigation. Stopped working as of update to salt version 3002.2 on Windows hosts
Receiving error message:
'set enabled to true to successfully start the service'
start_service_{{ service_name }}:
service.running:
- name: {{ service_name }}
#}
{% if salt['service.start'](service_name) == True %}
start_service_{{ service_name }}:
test.show_notification:
- text: {{ service_name }} started
{% else %}
failed_to_start_service_{{ service_name }}:
test.fail_without_changes:
- text: {{ service_name }} failed to start
{% endif %}
My final Windows service should look the following way:
Manual (Service should not be started at the boot time)
Running (service.running state)
If I try to set 'enable: True' and run service.disabled, service becomes:
Disabled
Running
Ideally we should have three types of 'enable' state that is:
- Manual (NEW FEATURE)
- Automatic (True)
- Disabled (False)
- None (currently does not allow to start service)
I am wondering what was the reason reason behind this implementation, is there any Microsoft article that explicitly says that the service MUST be enabled in order to run?
Reference commit by @weswhet @dwoz :
https://github.com/saltstack/salt/commit/4798babaef859ac39c1499bba12680580cf3e5c4#diff-2f7c8c335ccacbfa84a72e52f66a67fd926e52f221ca9807ad7f7ed3814d0962R517
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.