Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PUP 4.9.2
-
Coremunity
-
Platform Core KANBAN
-
Bug Fix
-
-
Needs Assessment
Description
The systemd service provider doesn't use double dashes for ending options, meaning that it will fail on any service with a name beginning with a - (dash):
13:52:54 runejuhl@tolu:~
|
$ /opt/puppetlabs/bin/puppet --version
|
4.9.2
|
13:53:00 runejuhl@tolu:~
|
$ /opt/puppetlabs/bin/puppet apply -e "service { '-h-asd': enable=>true}" | head
|
Notice: Compiled catalog for tolu.petardo.dk in environment production in 0.27 seconds
|
systemctl [OPTIONS...] {COMMAND} ...
|
|
Query or send control commands to the systemd manager.
|
|
-h --help Show this help
|
--version Show package version
|
--system Connect to system manager
|
--user Connect to user service manager
|
-H --host=[USER@]HOST
|
Error: Failed to apply catalog: Broken pipe @ io_write - <STDOUT>
|
Units starting with - are fairly common in systemd, e.g. the -.mount unit.
For a quick fix, it looks like changing https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/systemd.rb#L47 like this would work (albeit only when enabling/disabling):
- output = systemctl(action, @resource[:name])
|
+ output = systemctl(action, '--', @resource[:name])
|
Attachments
Issue Links
- relates to
-
PUP-10149 Systemd provider daemon-reload broken in puppet 6.11.0
-
- Resolved
-