Resolution: Cannot Reproduce
Affects Version/s: FACT 3.1.3
Fix Version/s: None
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.
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.
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: