Search code examples
upgradepuppetfacter

Facts.d - Pluginfacts could not be retrieved during puppet run


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


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