Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10949

Puppet cannot parse systemd instances when list-unit-files output has an additional column

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.22.0, PUP 7.6.0
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Team:
      Night's Watch
    • Story Points:
      1
    • Sprint:
      NW - 2021-03-31
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fix a bug affecting the parsing of systemd service instances caused by a change in the `systemctl list-unit-files` command output.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.21.1/7.4.1
      Puppet Server Version: n/a
      OS Name/Version: Fedora 32/Ubuntu 20.04

      Some time ago the output of systemctl list-unit-files changed to include an additional column. Previous output (on CentOS 8):

      UNIT FILE                                   STATE          
      arp-ethers.service                          disabled       
      auditd.service                              enabled        
      auth-rpcgss-module.service                  static         
      

      Current output (on Fedora 32 and Ubuntu 20.04):

      UNIT FILE                                  STATE           VENDOR PRESET
      arp-ethers.service                         disabled        disabled     
      auditd.service                             enabled         enabled      
      auth-rpcgss-module.service                 static          disabled     
      

      Desired Behavior:

      puppet resource service produces a list of services

      Actual Behavior:

      puppet resource service does not print anything

      The following regex should be updated to allow for both types of output: https://github.com/puppetlabs/puppet/blob/3df444559245c3fd9e3e78f58ade40e256a756ba/lib/puppet/provider/service/systemd.rb#L33

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gabriel.nagy Gabriel Nagy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support