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

Facter task assumes facter is on path

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • None
    • Hide

      fact task should work without facter being on the path

      Show
      fact task should work without facter being on the path
    • Customer Feedback
    • Major
    • 4 - 50-90% of Customers
    • 3 - Serious
    • 4 - $$$$$
    • This seems to effect many of the less common OSs(Solaris, AIX), or people with non-standard PATH issues.
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support