Jira (PUP-7218) systemd service provider missing double dash

12 views
Skip to first unread message

Rune Juhl Jacobsen (JIRA)

unread,
Feb 14, 2017, 7:57:03 AM2/14/17
to puppe...@googlegroups.com
Rune Juhl Jacobsen created an issue
 
Puppet / Bug PUP-7218
systemd service provider missing double dash
Issue Type: Bug Bug
Affects Versions: PUP 4.9.2
Assignee: Unassigned
Components: Types and Providers
Created: 2017/02/14 4:55 AM
Labels: provider systemd service
Priority: Normal Normal
Reporter: Rune Juhl Jacobsen

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])

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Moses Mendoza (JIRA)

unread,
Feb 14, 2017, 12:19:03 PM2/14/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Team: Agent & Platform

Moses Mendoza (JIRA)

unread,
Feb 14, 2017, 12:19:03 PM2/14/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Sprint: AP Grooming

Moses Mendoza (JIRA)

unread,
Feb 14, 2017, 12:19:04 PM2/14/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Mar 1, 2017, 12:00:51 PM3/1/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
 
Change By: Geoff Nichols
Sprint: AP Grooming  On-Deck

Geoff Nichols (JIRA)

unread,
Mar 1, 2017, 12:01:10 PM3/1/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Mar 1, 2017, 12:01:13 PM3/1/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Apr 13, 2017, 1:45:10 AM4/13/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent Grooming On-Deck

Scott Garman (JIRA)

unread,
May 17, 2017, 1:00:15 PM5/17/17
to puppe...@googlegroups.com
Scott Garman updated an issue
Change By: Scott Garman
Labels: provider service systemd  triaged

Branan Riley (JIRA)

unread,
May 14, 2018, 2:41:04 PM5/14/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: beginner linux provider service systemd triaged type_and_provider
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Justin Collier (JIRA)

unread,
Oct 1, 2019, 8:45:03 PM10/1/19
to puppe...@googlegroups.com
Justin Collier assigned an issue to Justin Collier
Change By: Justin Collier
Assignee: Justin Collier

Josh Cooper (JIRA)

unread,
Oct 1, 2019, 11:00:03 PM10/1/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Platform OS Coremunity

Josh Cooper (JIRA)

unread,
Oct 30, 2019, 5:58:03 PM10/30/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Oct 30, 2019, 5:58:04 PM10/30/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.11.0
Fix Version/s: PUP 6.4.5
Fix Version/s: PUP 5.5.18

Josh Cooper (JIRA)

unread,
Oct 30, 2019, 5:58:04 PM10/30/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core KANBAN

Josh Cooper (JIRA)

unread,
Nov 8, 2019, 3:47:03 PM11/8/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes Summary: puppet can no manage systemd services whose names start with dash, such as the " -.mount" unit.

Thanks to Justin Collier (j-collier) for the contribution
Release Notes: Bug Fix

Heston Hoffman (JIRA)

unread,
Nov 18, 2019, 1:17:05 PM11/18/19
to puppe...@googlegroups.com
Heston Hoffman updated an issue
Change By: Heston Hoffman
Labels: beginner linux provider resolved-issue-added service systemd type_and_provider
Reply all
Reply to author
Forward
0 new messages