Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-5747

Facter task assumes facter is on path

    XMLWordPrintable

    Details

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

      fact task should work without facter being on the path

      Show
      fact task should work without facter being on the path
    • Method Found:
      Customer Feedback
    • CS Priority:
      Major
    • CS Frequency:
      4 - 50-90% of Customers
    • CS Severity:
      3 - Serious
    • CS Business Value:
      4 - $$$$$
    • CS Impact:
      This seems to effect many of the less common OSs(Solaris, AIX), or people with non-standard PATH issues.
    • QA Risk Assessment:
      Needs Assessment

      Description

      The facter task runs in the Puppet ruby but shells out to the facter binary.

      https://github.com/puppetlabs/puppetlabs-facter_task/blob/master/tasks/init.rb#L8

      This means if facter isn't on the path then it won't run successfully, eg. resulting in a stack trace on bolt like:

      /opt/puppetlabs/puppet/lib/ruby/2.4.0/open3.rb:199:in `spawn': No such file or directory - facter (Errno::ENOENT)
              from /opt/puppetlabs/puppet/lib/ruby/2.4.0/open3.rb:199:in `popen_run'
              from /opt/puppetlabs/puppet/lib/ruby/2.4.0/open3.rb:95:in `popen3'
              from /opt/puppetlabs/puppet/lib/ruby/2.4.0/open3.rb:258:in `capture3'
              from /tmp/tmp.a9S6TsO28X/init.rb:9:in `get'
              from /tmp/tmp.a9S6TsO28X/init.rb:18:in `<main>'
      

      Note that given the Puppet dependency, Facter has a Ruby interface which could be used rather than shelling out. Alternatively the documentation could make it clear facter needs to be on the path and the module could provide a more user friendly error to make the route cause clear.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              adam.bottchen Adam Bottchen
              Reporter:
              gareth Gareth Rushgrove
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support