Jira (PUP-10412) systemd service provider only works on running systems

39 views
Skip to first unread message

Matthew Monaco (Jira)

unread,
Apr 5, 2020, 6:01:03 PM4/5/20
to puppe...@googlegroups.com
Matthew Monaco created an issue
 
Puppet / Bug PUP-10412
systemd service provider only works on running systems
Issue Type: Bug Bug
Affects Versions: PUP 6.14.0
Assignee: Unassigned
Components: Types and Providers
Created: 2020/04/05 3:00 PM
Priority: Normal Normal
Reporter: Matthew Monaco

Puppet Version: 6.14.0
Puppet Server Version:
OS Name/Version: Any systemd-based linux

The systemd service provider "is not functional on this host" in a systemd-nspawn container running without `-boot` or with `-as-pid2`. In these cases there is a separate PID namespace and PID 1 is not systemd. This is because the current "confines" in `providers/service/systemd.rb` checks for "systemd" in `/proc/1/comm`.

Desired Behavior:

Using systemctl to enable/disable/mask units only needs `/usr/bin/systemctl` to exist. If possible I could see having different behavior for handling `ensure` vs `enable` based on PID1. However, when setting up a container image, I should be able to enable/disable/mask services.

 

 

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

Josh Cooper (Jira)

unread,
Apr 6, 2020, 1:22:04 PM4/6/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Apr 14, 2020, 10:51:03 AM4/14/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 3:51:05 AM11/5/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 3:52:05 AM11/5/20
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jun 22, 2021, 4:20:01 AM6/22/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: ready for triage
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Martin Petersen (Jira)

unread,
Jul 21, 2021, 4:43:04 AM7/21/21
to puppe...@googlegroups.com

Joel Wilson (Jira)

unread,
Sep 29, 2021, 3:07:03 PM9/29/21
to puppe...@googlegroups.com
Joel Wilson commented on Bug PUP-10412

Also seeing this when rspec testing with elasticsearch module:

    elasticsearch:
      repo: elastic/elasticsearch
      ref: '6.3.3'

Joel Wilson (Jira)

unread,
Sep 29, 2021, 5:12:03 PM9/29/21
to puppe...@googlegroups.com
Joel Wilson commented on Bug PUP-10412

Trying to do something similar to what is described in the closed, linked ticket PUP-11167.  However, I have to keep adding all the providers, even though I've only got 2 platforms identified in my metadata.json:

before(:each) do
    [:redhat, :debian, :runit, :openrc, :daemontools].each do |provider|
        Puppet::Type.type(:service).provide(provider).has_feature :maskable
    end
end

Ciprian Badescu (Jira)

unread,
Oct 7, 2021, 9:30:03 AM10/7/21
to puppe...@googlegroups.com

Joel Wilson, could you mock the checks for `/proc/1/comm`?

Reply all
Reply to author
Forward
0 new messages