unable to load puppet_x/unbound/validate_addrs (on puppetserver)
Closed this issue · 9 comments
when running puppet-unbound under puppetserver, it seems unable to load the puppet_x module
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not autoload puppet/parser/functions/validate_unbound_addr:
no such file to load -- puppet_x/unbound/validate_addrs on node ns01.esat
the appropriate puppet issue is https://tickets.puppetlabs.com/browse/PUP-4450
I'm hitting the same issue.
Any chance this could be fixed soon?
Thanks,
Marin
Thanks xaque208, great module.
+1 is there a workaround or is this module simply not compatible with puppetserver?
For now, its not compatible. Helping push the conversation or add more information to https://tickets.puppetlabs.com/browse/PUP-4450 may help speed this along. Also note there is a PR in on Puppet, but looking over the comments it doesn't look like puppetlabs/puppet#4445 will be merged.
This is a long standing issue with puppet: https://projects.puppetlabs.com/issues/4248
The autoloader can load an environment specific function (or type, provider, report, etc), but the autoloader does not participate in loading its transitive dependencies. So if your function does a "raw" require puppet_x/unbound/validate_addrs
, then ruby can't load it from an environment specific modulepath.
The general workaround is to require the helper code relative to the current file being autoloaded, e.g.
require File.dirname(__FILE__) + ' /../../puppet_x/unbound/validate_addrs'
I don't know if that's the right number of ..
's, but you get the idea. It's an ugly hack, but is used pretty widely in modules.
Excellent, thank you for the information @joshcooper!
Would someone who is running Puppetserver mind testing out the above PR please?
This should be fixed in 1.2.1
.