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

facter --puppet doesn't load plugin synced facts in PE 2015.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: FACT 3.1.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      I'm working on site with $customer, and I'm running into the following strange behavior with diagnosing a custom fact synchronized via pluginsync to a PE 2015.3 agent. The impact data is that this fact affects all of the puppet manifests for $customer and they're a paying PE customer. They're evaluating the work required to upgrade from 3.8.x to 2015.x.

      Expected behavior:

      After a successful puppet agent -t run that synchronizes a single custom fact located at /etc/puppetlabs/code/environments/production/modules/plugins/lib/facter/apache.rb, $customer wants to debug why the fact value is not what they expect it to be, so they run facter --puppet expecting to see a value for a fact named apache_exists.

      Actual behavior:

      No such fact exists, implying the synchronized fact is not loaded.

      Additional steps to reproduce:

      Install pry using sudo /opt/puppetlabs/puppet/bin/gem install pry --no-ri --no-rdoc. Place require 'pry'; binding.pry; in the first line of the custom fact. Synchronize the fact with puppet agent -t, observe Puppet dropping into a Pry REPL. Try facter --puppet and observe no REPL behavior, implying the fact is not loaded.

      Additional steps to inform the hypothesis:

      Manually augmenting the ruby load path evaluates the custom fact from the pluginsync location:

      vagrant@vagrant-ubuntu-trusty-64:~$ RUBYLIB=/opt/puppetlabs/puppet/cache/lib facter -p
      2015-12-09 05:44:09.019021 WARN  puppetlabs.facter - skipping external facts for "/home/vagrant/.puppetlabs/opt/puppet/cache/facts.d": No such file or directory
      History file not loaded: Permission denied @ rb_sysopen - /home/vagrant/.pry_history
       
      From: /opt/puppetlabs/puppet/cache/lib/facter/apache.rb @ line 1 :
       
       => 1: require 'pry'; binding.pry;
          2: Facter.add(:apache_exists) do
      ...
      

      This seems related to FACT-1111 and FACT-96

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jeffmccune Jeff McCune
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support