Puppet: System Administration Automated

Support

Ticket #1002 (new defect)

Opened 8 months ago

Last modified 5 months ago

factpath must be specified because puppetd does not honour facts in $libdir/facter

Reported by: Fujin Assigned to: community
Priority: normal Milestone:
Component: unknown Version: 0.24.1
Severity: normal Keywords: facts
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Unknown

Description

in 0.24.1, factpath must be specified, even when $libdir (default: /var/lib/puppet/lib) contains a 'facter' folder. I would have naturally assumed that facts in $libdir/facter would be automatically parsed and loaded, but they are not. Please advise if this is desired behaviour (e.g. third party facts are only loaded when factpath is specified) or infact a bug.

root@asterisk02:/etc/puppet# puppetd --configprint libdir
/var/lib/puppet/lib
root@asterisk02:/etc/puppet# cat puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
#factpath=/var/lib/puppet/lib/facter
ssldir=/var/lib/puppet/ssl
pidfile=/var/run/puppet/$name.pid

[puppetd]
runinterval=120
pluginsync=true
root@asterisk02:/var/lib/puppet/lib# find ./facter/
./facter/
./facter/interfaces.rb
./facter/netmask.rb
./facter/acpi_available.rb
root@asterisk02:/var/lib/puppet/lib# puppetd --test --noop
info: Retrieving plugins
notice: Ignoring cache
info: /Exec[/usr/sbin/usermod -p 9E3gV2S6ApjUs root]: Adding aliases "setrootpassword"
info: /Exec[/usr/bin/apt-get update]: Adding aliases "aptgetupdate"
info: /Exec[/bin/true # require_lsbdistcodename]: Adding aliases "require_lsbdistcodename"
info: /Exec[/bin/true # assert_lsbdistcodename]: Adding aliases "assert_lsbdistcodename"
info: Caching catalog at /var/lib/puppet/state/localconfig.yaml
notice: Starting catalog run
7c7
< #factpath=/var/lib/puppet/lib/facter
---
> factpath=/var/lib/puppet/lib/facter
notice: //Node[asterisk02]/generic-systems/File[/etc/puppet/puppet.conf]/checksum: is {md5}b8f00560c339013c0881326141f06b8b, should be md5 (noop)
notice: //Node[asterisk02]/generic-systems/File[/etc/puppet/puppet.conf]/source: is {md5}b140780858ba536b64ea2af86502e5dc, should be puppet:///files/puppet.conf (noop)
notice: //Node[asterisk02]/generic-systems/monit::puppet/Service[monit]/ensure: is stopped, should be running (noop)
notice: Finished catalog run in 9.93 seconds
root@asterisk02:/var/lib/puppet/lib# puppetd --test --noop --factpath=/var/lib/puppet/lib/facter
info: Loading fact interfaces
info: Loading fact netmask
info: Loading fact acpi_available
info: Retrieving plugins
notice: Ignoring cache
info: /Exec[/bin/true # require_lsbdistcodename]: Adding aliases "require_lsbdistcodename"
info: /Exec[/bin/true # assert_lsbdistcodename]: Adding aliases "assert_lsbdistcodename"
info: /Exec[/usr/bin/apt-get update]: Adding aliases "aptgetupdate"
info: /Exec[/usr/sbin/usermod -p 9E3gV2S6ApjUs root]: Adding aliases "setrootpassword"
info: Caching catalog at /var/lib/puppet/state/localconfig.yaml
notice: Starting catalog run
7c7
< #factpath=/var/lib/puppet/lib/facter
---
> factpath=/var/lib/puppet/lib/facter
notice: //Node[asterisk02]/generic-systems/File[/etc/puppet/puppet.conf]/checksum: is {md5}b8f00560c339013c0881326141f06b8b, should be md5 (noop)
notice: //Node[asterisk02]/generic-systems/File[/etc/puppet/puppet.conf]/source: is {md5}b140780858ba536b64ea2af86502e5dc, should be puppet:///files/puppet.conf (noop)
notice: //Node[asterisk02]/generic-systems/monit::puppet/Service[monit]/ensure: is stopped, should be running (noop)
notice: Finished catalog run in 6.59 seconds

As you can see, with factpath specified the facts are loaded, yet without it they are not.

Change History

01/28/08 04:44:59 changed by luke

  • stage changed from Unreviewed to Accepted.

Given the ease of the workaround, and the fact that I'm going to have to rewrite a good bit of the code associated with this for 0.25, I'm not going to push to get this into 0.24.2.

04/24/08 07:10:42 changed by luke

  • component changed from client to unknown.