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

[Regression] Puppet Service not enabled anymore when installed via debian-installer

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Platform OS
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      puppet service will now be properly enabled when it is installed as part of a Debian chroot or preseed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Since 5.5.2, systemd services are not enabled anymore on any Debian-based OS (Ubuntu 18.04, Debian itself) using systemd natively, if the packages are installed in a chroot environment, such as the debian-installer.

      So in any automated deployment tool deploying puppet during Preseed (e.g. Foreman), Puppet services will not be enabled anymore and won't run when rebooting into the real OS afterwards.

       

      The reason is the commit at:

      https://github.com/puppetlabs/puppet-agent/pull/1394/commits/815870e47cfaf22c874d500b833b5c2645a84670#r192932207

      My comment there also explains the mistake:

      Checking for existence of /run/systemd/system is the wrong approach to identify whether systemd is used as init-system. The correct test working in all environments I have encountered, especially also in chroots-environments, is to check for:
      /sbin/init being a link to /lib/systemd/systemd.

      The very same bug also exists in Puppet service handling itself since many years:
      https://tickets.puppetlabs.com/browse/PA-136
      and the very same fix has been proposed, but the proposal sadly has not been commented on at all.

      As a result, ugly hacks are growing in the wild, e.g. scripts creating /run/systemd/system before running puppet in a chroot to workaround this widespread issue.

      Cheers,
      Oliver

        Attachments

          Activity

            People

            Assignee:
            branan Branan Riley
            Reporter:
            olifre Oliver Freyermuth
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support