Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2941

'puppet facts diff' logs error when apt module is installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 3.14.17
    • Component/s: None
    • Labels:
    • Template:
    • Acceptance Criteria:
      Hide

      puppet facts diff does not log any error

      Show
      puppet facts diff does not log any error
    • Team:
      Night's Watch
    • Story Points:
      3
    • Sprint:
      NW - 2021-03-03
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      before this commit, each time `require facter` was executed facter and puppet bin directories were added to PATH environment variable even if they were already added to PATH

      after this commit, `require facter` will add facter and puppet bin directories to PATH only if they were not already added
      Show
      before this commit, each time `require facter` was executed facter and puppet bin directories were added to PATH environment variable even if they were already added to PATH after this commit, `require facter` will add facter and puppet bin directories to PATH only if they were not already added
    • QA Risk Assessment:
      Needs Assessment

      Description

      Platforms: OS X, Centos 7 (as tested by me), might be on all
      pupptlabs-apt: 7.7.1(latest)

      Step to reproduce:

      • install latest puppet 6
      • install puppetlabs-apt module
      • run `puppet facts diff`

      ❯ puppet --version
      6.21.1
      ❯ puppet facts diff
      {"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}
       
      ❯ puppet module install puppetlabs-stdlib
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Notice: Installing -- do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └── puppetlabs-stdlib (v6.6.0)
       
      ❯ puppet facts diff
      {"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}
       
      ❯ puppet module install puppetlabs-apt
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Notice: Installing -- do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └─┬ puppetlabs-apt (v7.7.1)
        ├── puppetlabs-stdlib (v6.6.0)
        └── puppetlabs-translate (v2.2.0)
       
      ❯ puppet facts diff
      E, [2021-02-17T07:14:34.049701 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.051667 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.053433 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_security_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.055293 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_security_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.057133 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.058807 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.060489 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_security_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      E, [2021-02-17T07:14:34.062122 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_security_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
      {"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}
      
      

      /opt/puppetlabs/puppet/bin/facter-ng does not log any error so most likely it happens when resolving the facts added in puppet form modules.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ciprian.badescu Ciprian Badescu
              Reporter:
              gheorghe.popescu Gheorghe Popescu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support