Question

I've just upgraded my puppet environment from 3.4.2 to 3.4.3. through puppetlabs' apt repos. I was upgrading agent(s) and master. Doing an agent run leads to following error:

Info: Retrieving pluginfacts
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: file_metadata supports formats: pson yaml b64_zlib_yaml raw
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: file_metadata supports formats: pson yaml b64_zlib_yaml raw

Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://<puppetserver>/pluginfacts

Debug: Finishing transaction [...]

Nevertheless I retrieve a catalog from master, so the agent run still works and seems to do the things it should do. (Or let's say, I acutally can't determine, if something is going wrong that is related to the error message.)

However, I want to get rid of the Error message.

I double-checked version of puppet with puppet --version on agent and master. I use passenger for puppetmaster. Facter has version 2.0.1. So what did I miss?

Addition: When running an agent with the previous version 3.4.2 there will be no error message.

Any ideas? Many thanks for your support.

ITL

Was it helpful?

Solution

This is due to this bug: https://tickets.puppetlabs.com/browse/PUP-3655

The issue is that for pluginsync to work, there must be at least one module in the environment that has a facts.d directory directly off of the top level of the module.

My work around for this was to create an executable facts.d/README file at the top level of one of our main internal modules that contained the following:

#!/bin/bash
# This directory is where external fact scripts would go, if we had any.  This
# directory exists only because with directory environments puppet will
# complain if there isn't a single module in an environment that doesn't have a
# facts.d directory.
echo "bug=https://tickets.puppetlabs.com/browse/PUP-3655"
exit 0

OTHER TIPS

The problem your encounter here comes from facter update, and the way you use private facts with puppet on version 3.X with facter 2.X.when you want to distribute external facts (that was my case).

As said in facter 2.2 documentation, you need to relocate your facter folder into module tree :

The best way to distribute external facts is with pluginsync, which added support for them in Puppet 3.4/Facter 2.0.1. To add external facts to your puppet modules, just place them in MODULEPATH/MODULE/facts.d/.

So, in older versions, the path for external facts was :

MODULEPATH/MODULE/lib/facter/external_fact.rb

If you change it to :

MODULEPATH/MODULE/facts.d/external_fact.rb

Then you won't encounter the problem any more.

Regards

-- rustx

Facter 2.0.1 was released yesterday. That's your problem. Downgrade to 1.7.x and you should be fine.

Caught the same error today, reconfiguring my puppet master:

Info: Retrieving pluginfacts
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet/pluginfacts
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet/plugins
Info: Caching catalog for puppet
Info: Applying configuration version '1405577010'

Here are my versions:

grundic@puppet:~$ puppet --version
3.6.2
grundic@puppet:~$ facter --version
2.1.0

Restarting daemon helped me (I use puppet master behind passenger):

grundic@puppet:~$ sudo service apache2 restart 
 * Restarting web server apache2
 ... waiting    ...done.
grundic@puppet:~$ sudo puppet agent --test --verbose
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for puppet
Info: Applying configuration version '1405607835'
Notice: Dummy message for debugging
Notice: /Stage[main]/Main/Notify[Dummy message for debugging]/message: defined 'message' as 'Dummy message for debugging'
Notice: Finished catalog run in 0.06 seconds

I had the same erorrs running puppet 3.6.2 on centos 6.5. Downgrading puppet,puppet-server, facter and hiera to the previous version (3.6.1, 2.0.2, 1.3.3) 'resolves' the issue..

As Grundic said, restart master.

Then clean up certs to the puppet agent on the master and remove the certs on the agent. Then re-run puppet agent -t and puppet cert sign --all. It will all go away. That worked for me.

for path in `ls */lib/facter | grep :$ | sed "s,:,,"`; 
   do MODULE=`echo $path | sed "s,/lib/facter,,"`; 
   cd $MODULE && ln  -s lib/facter facts.d && cd .. ;
done

these parts are especially important

`ls */lib/facter | grep :$ | sed "s,:,,"`

`echo $path | sed "s,/lib/facter,,"`

This code snippet ought to be run from /etc/puppet/modules as well as from the modules/ path for each environment at /etc/puppet/environments.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top