[PUP-3324]  pluginsync fails when no source is available Created: 2014/09/21  Updated: 2015/06/28  Resolved: 2015/06/28

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 3.7.1
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: garrett honeycutt Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
Duplicate
duplicates PUP-3655 Error: /File[/var/lib/puppet/facts.d]... Closed
Template:

 Description   

Regression of http://projects.reductivelabs.com/issues/2244

With the fairly recent inclusion of facts.d in a module to distribute facts, this bug seems to have been reintroduced.

  1. puppet agent -t

    Info: Retrieving pluginfacts
    Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet.example.com/pluginfacts
    Info: Retrieving plugin
    Info: Loading facts
    

To fix, I ensured a module existed with the facts.d directory

  1. mkdir -p /etc/puppet/modules/stfu/facts.d
  2. puppet agent -t --noop

    Info: Retrieving pluginfacts
    Info: Retrieving plugin
    Info: Loading facts
    



 Comments   
Comment by garrett honeycutt [ 2014/09/21 ]

While the issue does not prevent the puppet run, you see red on the screen indicating trouble, which is not a good first encounter with the software.

Comment by garrett honeycutt [ 2014/09/29 ]

Would it be possible to fix in the 3.x series since the bug was introduced then?

Comment by Eric Thompson [ 2014/09/30 ]

stumbled across this one myself. i can prevent the red from pluginsync by simply creating a modules dir in /etc/puppet/ (or installing any module). it can be empty

Comment by Eric Sorenson [ 2014/11/13 ]

Sure we'd take a patch to squelch this error but it's not a 4.0 required change.

Comment by William Hopper [ 2015/01/15 ]

garrett honeycutt Eric Thompson I'm trying to reproduce this (in a fresh Puppet 3.7.3 install), and short of deleting every directory in the modulepath, I can't seem to come up with a way to get this error. Would you mind describing the setup you have that's getting you this message?

Comment by garrett honeycutt [ 2015/01/15 ]

William Hopper You need to delete everything in the modulepath Check out our notes on reproducing the error and the hacks to fix it.

Comment by William Hopper [ 2015/01/15 ]

garrett honeycutt so the way we understand it then, we should be getting this error if we have a module, say, /etc/puppet/modules/mymodule that does not include a facts.d directory? We've spent some time trying various ways to force this error to occur (in Puppet 3.7.3) to no avail so far. (Apologies for all the questions - we're trying to get context on this since we're not sure how to reproduce )

Comment by William Hopper [ 2015/01/16 ]

For more context on what we've tried:

  • Install Puppet via yum.puppetlabs.com (we've done this with 3.7.1 and 3.7.3)
  • Run an agent against a master with an empty /etc/puppet/modules
  • Run an agent against a master with an /etc/puppet/modules with one or several modules without a facts.d directory
  • Setup directory environments on the master and run through the same steps as above in the production environment
  • Change the modulepath in puppet.conf and run through the above steps again
  • Delete every directory in the modulepath – this results in errors, but is not the same case that this ticket is referring to
Comment by William Hopper [ 2015/02/02 ]

garrett honeycutt by chance is your modulepath directory a symlink? We discovered PUP-3935 which was the issue you're describing but was caused by pluginsync not properly following symlinks.

Comment by Josh Cooper [ 2015/02/02 ]

I can reproduce by starting a master that doesn't contain any modules:

$ mkdir /tmp/master
$ bundle exec puppet master --autosign true --confdir /tmp/master --vardir /tmp/master --certname puppetmaster --dns_alt_names $(bundle exec facter fqdn) --no-daemonize

Run an agent on the same host:

$ bundle exec puppet agent -t --http_debug --server $(bundle exec facter fqdn) --certname agent
...
<- "GET /puppet/v3/file_metadata/pluginfacts?environment=production&links=follow&checksum_type=md5&source_permissions=use HTTP/1.1\r\nAccept: pson, msgpack, yaml, binary\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Ruby\r\nHost: arcturus.local:8140\r\n\r\n"
-> "HTTP/1.1 404 Not Found \r\n"
-> "X-Puppet-Version: 3.7.4\r\n"
-> "Content-Type: text/plain\r\n"
-> "Server: WEBrick/1.3.1 (Ruby/1.9.3/2014-02-24) OpenSSL/0.9.8r\r\n"
-> "Date: Mon, 02 Feb 2015 21:31:18 GMT\r\n"
-> "Content-Length: 51\r\n"
-> "Connection: Keep-Alive\r\n"
-> "\r\n"
reading 51 bytes...
-> ""
-> "Not Found: Could not find file_metadata pluginfacts"
read 51 bytes
Conn keep-alive
Error: /File[/Users/josh/.puppet/var/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///pluginfacts
Notice: /File[/Users/josh/.puppet/var/facts.d/exec-fact.sh]: Dependency File[/Users/josh/.puppet/var/facts.d] has failures: true
Warning: /File[/Users/josh/.puppet/var/facts.d/exec-fact.sh]: Skipping because of failed dependencies
Info: Retrieving plugin
<- "GET /puppet/v3/file_metadatas/plugins?environment=production&links=follow&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5 HTTP/1.1\r\nAccept: pson, msgpack, yaml, binary\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Ruby\r\nHost: arcturus.local:8140\r\n\r\n"
-> "HTTP/1.1 404 Not Found \r\n"
-> "X-Puppet-Version: 3.7.4\r\n"
-> "Content-Type: text/plain\r\n"
-> "Server: WEBrick/1.3.1 (Ruby/1.9.3/2014-02-24) OpenSSL/0.9.8r\r\n"
-> "Date: Mon, 02 Feb 2015 21:31:18 GMT\r\n"
-> "Content-Length: 67\r\n"
-> "Connection: Keep-Alive\r\n"
-> "\r\n"
reading 67 bytes...
-> ""
-> "Not Found: Could not find instances in file_metadata with 'plugins'"
read 67 bytes
Conn keep-alive
<- "GET /puppet/v3/file_metadata/plugins?environment=production&links=follow&checksum_type=md5&source_permissions=ignore HTTP/1.1\r\nAccept: pson, msgpack, yaml, binary\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Ruby\r\nHost: arcturus.local:8140\r\n\r\n"
-> "HTTP/1.1 404 Not Found \r\n"
-> "X-Puppet-Version: 3.7.4\r\n"
-> "Content-Type: text/plain\r\n"
-> "Server: WEBrick/1.3.1 (Ruby/1.9.3/2014-02-24) OpenSSL/0.9.8r\r\n"
-> "Date: Mon, 02 Feb 2015 21:31:18 GMT\r\n"
-> "Content-Length: 47\r\n"
-> "Connection: Keep-Alive\r\n"
-> "\r\n"
reading 47 bytes...
-> ""
-> "Not Found: Could not find file_metadata plugins"
read 47 bytes
Conn keep-alive
Error: /File[/Users/josh/.puppet/var/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///plugins

Note the above includes the fix for PUP-3935, as the pluginsync requests include links=follow.

Generated at Wed Apr 01 14:51:13 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.