-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Execution-ModuleP2Priority 2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work aroundstale
Milestone
Description
Hi,
In systemd, the true name for a service ends with ".service", the form without this suffix being merely a shortcut. SaltStack doesn't understand this:
enable-systemd-timesyncd:
service.enabled:
- name: systemd-timesyncd.service
...results in:
ID: enable-systemd-timesyncd
Function: service.enabled
Name: systemd-timesyncd.service
Result: False
Comment: The named service systemd-timesyncd.service is not available
Started: 15:33:45.193092
Duration: 157.018 ms
Changes:
If I remove ".service", it works:
enable-systemd-timesyncd:
service.enabled:
- name: systemd-timesyncd
...results in:
ID: enable-systemd-timesyncd
Function: service.enabled
Name: systemd-timesyncd
Result: True
Comment: Service systemd-timesyncd is already enabled, and is in the desired state
Started: 15:31:11.620675
Duration: 171.07 ms
Changes:
The form ending in ".service" being the true form, and the one without the suffix being a shortcut (emphasized by the bash completion for systemctl command), I think SaltStack should understand both and not give an error if ".service" is added to a service name.
Moreover, other suffices work as expected. For example, to have /tmp mounted in a ramdisk:
enable-ramtmp:
service.enabled:
- name: tmp.mount
...results in:
ID: enable-ramtmp
Function: service.enabled
Name: tmp.mount
Result: True
Comment: Service tmp.mount is already enabled, and is in the desired state
Started: 15:31:11.799996
Duration: 170.061 ms
Changes:
Thanks.
Metadata
Metadata
Assignees
Labels
Execution-ModuleP2Priority 2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work aroundstale