Jira (PUP-10814) Impossible to systemctl mask non-existing service

8 views
Skip to first unread message

Steve Traylen (Jira)

unread,
Dec 8, 2020, 7:11:02 AM12/8/20
to puppe...@googlegroups.com
Steve Traylen created an issue
 
Puppet / Bug PUP-10814
Impossible to systemctl mask non-existing service
Issue Type: Bug Bug
Affects Versions: PUP 6.15.0
Assignee: Unassigned
Components: Catalog Application
Created: 2020/12/08 4:10 AM
Environment:

 
 
// code placeholder

Priority: Normal Normal
Reporter: Steve Traylen

Puppet Version: 6.15.0
Puppet Server Version: 6.15.0
OS Name/Version: CentOS 8

puppet apply the following snippet

service{'non-existing.service':
   ensure => mask,
}

results in. 

Error: Could not disable foobar.service: 
Error: /Stage[main]/Main/Service[non-existing.service]/enable: change from 'false' to 'mask' failed: Could not disable foobar.service:

 
Desired Behavior:
A service can be masked irrespective of if the unit exists.

systemctl mask non-existing.service
Unit non-existing.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/non-existing.service → /dev/null.

and this is desirable since you want to mask things to stop a vendor setting
winning later.

puppet should proceed with the above mask for a non-existant service.
 
Actual Behavior:

The non-existant unit is not masked.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Steve Traylen (Jira)

unread,
Dec 8, 2020, 7:15:02 AM12/8/20
to puppe...@googlegroups.com
Steve Traylen updated an issue
Change By: Steve Traylen
*Puppet Version: 6.15.0*
*Puppet Server Version: 6.15.0*
*OS Name/Version: CentOS 8*


puppet apply the following snippet

{noformat}

service{'non-existing.service':
   ensure => mask,
}
{noformat}

results in. 

{noformat}
Error: Could not disable
foobar non-existing .service:
Error: /Stage[main]/Main/Service[non-existing.service]/enable: change from 'false' to 'mask' failed: Could not disable foobar.service:
{noformat}
 
*Desired Behavior:*

A service can be masked irrespective of if the unit exists.

{noformat}

systemctl mask non-existing.service
Unit non-existing.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/non-existing.service → /dev/null.
{noformat}


and this  is desirable since you want to mask things to stop a vendor setting
winning later.

puppet should proceed with the above mask for a non-existant service.
 
*Actual Behavior:*


The non-existant unit is not masked.


Josh Cooper (Jira)

unread,
Dec 8, 2020, 10:25:03 AM12/8/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10814
 
Re: Impossible to systemctl mask non-existing service

We've had issues in the past with different behavior across platforms for non-existent services, see PUP-7191, PUP-7040, PUP-41.

Mihai Buzgau (Jira)

unread,
Dec 8, 2020, 10:59:03 AM12/8/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Dec 8, 2020, 11:05:03 AM12/8/20
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug PUP-10814
 
Re: Impossible to systemctl mask non-existing service

Thank you for filing this issue. We agree it is likely an improvement, but due to other issues demanding precedence, we don’t anticipate being able to address this any time soon. If you are interested in submitting a patch to the repository for this project at https://github.com/puppetlabs, please open a pull request.

Reply all
Reply to author
Forward
0 new messages