Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
None
-
None
-
None
-
1
-
Client 2015-04-29
Description
Executing puppet with cfacter and stdlib generates an error every time puppet runs:
[root@jaiuwwlivqmy8by ~]# puppet --version
|
4.0.0-rc1
|
[root@jaiuwwlivqmy8by ~]# facter --version
|
2.4.2
|
[root@jaiuwwlivqmy8by ~]# cfacter --version
|
0.4.0 (commit f4eecdfa9ff69c801bfedba3fc0fd5285e86b3c5)
|
[root@jaiuwwlivqmy8by ~]# facter puppetversion
|
4.0.0-rc1
|
[root@jaiuwwlivqmy8by ~]# cfacter puppetversion
|
|
[root@jaiuwwlivqmy8by ~]# time puppet agent -t --server $(facter fqdn) --cfacter --trace
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Error: Facter: error while resolving custom fact "pe_version": undefined method `match' for nil:NilClass
|
backtrace:
|
/opt/puppetlabs/puppet/cache/lib/facter/pe_version.rb:13:in `block (2 levels) in <top (required)>'
|
/opt/puppetlabs/puppet/cache/lib/facter/pe_version.rb:20:in `call'
|
/opt/puppetlabs/puppet/cache/lib/facter/pe_version.rb:20:in `value'
|
/opt/puppetlabs/puppet/cache/lib/facter/pe_version.rb:20:in `block (2 levels) in <top (required)>'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:27:in `call'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:27:in `to_hash'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:27:in `find'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:in `find'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer/fact_handler.rb:15:in `find_facts'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer/fact_handler.rb:31:in `facts_for_uploading'
|
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:97:in `get_facts'
|
The error occurs because cfacter doesn't define the puppetversion fact, which causes stdlib issues:
pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/) |
It makes sense for cfacter to not generate the puppetversion fact when run standalone (because we don't want a cyclic dependency). But I would think puppet would inject its puppetversion into facter (whichever implementation is being used), so that the fact is present during fact resolution and later compilation. So arguably this is a puppet issue, but may affect the facter/cfacter interface?
risk assessment: high
probability: high (PE requires)
severity: high
test layer: unit
Resolution:
Puppet now adds the puppetversion fact if it's using cfacter.
Attachments
Issue Links
- blocks
-
FACT-956 Update puppet-agent#master to build facter#master, remove cfacter
-
- Closed
-
- is blocked by
-
PUP-4607 External facts no longer load from pluginsync'ed directory
-
- Closed
-
- relates to
-
FACT-1347 puppetversion only contains a number
-
- Closed
-
-
PUP-4457 Puppet::Node::Facts add_local_facts -- review for deprecation
-
- Closed
-
-
FACT-853 Move native facter codebase to facter#master
-
- Closed
-
- links to
1.
|
create puppetversion acceptance test |
|
Closed | Unassigned |