Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-2028

Puppet Agent Installer Fails when Systemd is not present - Debian 9

    XMLWordPrintable

Details

    • Night's Watch
    • 5
    • NW - 2021-02-03, NW - 2021-02-17
    • Normal
    • 1 - 1-5% of Customers
    • 3 - Serious
    • 3 - $$$$
    • This prevents users from installing the agent onto their Debian9 systems running SysV. This was previously possible to work around and if we can easily port code from another installer to allow this we should.
    • 42632
    • 1
    • Known Issue
    • The `puppet-agent` package does not include sysv init scripts for Debian 9 (Stretch) and newer. If you have disabled or removed systemd, `puppet-agent` installation and Puppet agent runs can fail.
    • Needs Assessment

    Description

      In Debian 9 it is possible to remove systemd entirely and run with sysV. The customer has this by default in thier images due to some sort of 3rd party application requirement.

      When running the Puppet agent installer appears to be hardcoded to use SystemD

       

      // root@pe-2016410-agent-dbe9:/home/vagrant# curl -k https://pe-2016410-master.puppetdebug.vlan:8140/packages/current/install.bash | sudo bash
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 25633  100 25633    0     0   409k      0 --:--:-- --:--:-- --:--:--  410k
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      apt-transport-https is already the newest version (1.4.8).
      0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
      OK
      OK
      + DEBIAN_FRONTEND=noninteractive
      + apt-get install -y -o Apt::Get::Purge=false -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends 'puppet-agent=1.10.10*'
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Selected version '1.10.10-1stretch' (Puppet Labs:pe-2016410-master.puppetdebug.vlan [amd64]) for 'puppet-agent'
      The following NEW packages will be installed:
        puppet-agent
      0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
      Need to get 0 B/15.4 MB of archives.
      After this operation, 93.9 MB of additional disk space will be used.
      Selecting previously unselected package puppet-agent.
      (Reading database ... 26230 files and directories currently installed.)
      Preparing to unpack .../puppet-agent_1.10.10-1stretch_amd64.deb ...
      Unpacking puppet-agent (1.10.10-1stretch) ...
      Setting up puppet-agent (1.10.10-1stretch) ...
      /var/lib/dpkg/info/puppet-agent.postinst: line 7: systemctl: command not found
      /var/lib/dpkg/info/puppet-agent.postinst: line 14: systemctl: command not found
      /var/lib/dpkg/info/puppet-agent.postinst: line 21: systemctl: command not found
      Processing triggers for libc-bin (2.24-11+deb9u3) ...
      + set +x
      [main]
      service { 'puppet':
        ensure => 'stopped',
      }
      Error: Could not find init script for 'puppet'
      Error: /Service[puppet]/ensure: change from stopped to running failed: Could not find init script for 'puppet'
      service { 'puppet':
        ensure => 'stopped',
        enable => 'false',
      

      resulting in a failed install, This is a request to make the installer more robust to that it tests which provider is available.

       

       

      To reproduce:

       

      // Install the sysvinit packages: apt-get install sysvinit-core
      Copy inittab: cp /usr/share/sysvinit/inittab /etc/inittab
      Reboot the system: reboot
       
      Remove the systemd packages, including libpam-systemd: 
      apt-get remove --purge --auto-remove systemd
      Prevent apt from installing systemd-related packages in the future: 
      echo -e 'Package: *systemd*\nPin: release *\nPin-Priority: -1\n' > /etc/apt/preferences.d/systemd
      

       

      Attachments

        Issue Links

          Activity

            People

              ciprian.badescu Ciprian Badescu
              martin.ewings Marty Ewings
              Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support