-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not autoload puppet/provider/network_config/interfaces: no such file to load -- puppetx/filemapper #77
Comments
Hi kotowicz, I had the same problem, reboot the master and then worked OK |
rebooting did not solve my problem. |
Ditto. Debian Wheezy here, followed the instructions and see: root@soap:~# puppet agent --test |
@ConnarPierce Do you have pluginsync disabled? Pluginsync needs to be working in order for custom types to function. |
@jhoblitt Where do I find that out? I just did a fresh install and am brand new to all of this. EDIT: I just rebooted the agent and it's now working: root@soap:~# puppet agent --test If you could still clarify the pluginsync thing, I'd appreciate it. |
run 'puppet plugin download' on your master. Would be nice if module somehow did it itself. |
@vchepkov this doesn't help either: $ puppet plugin download
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Temporary failure in name resolution
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/plugins: getaddrinfo: Temporary failure in name resolution
Wrapped exception:
getaddrinfo: Temporary failure in name resolution
Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Temporary failure in name resolution
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/pluginfacts: getaddrinfo: Temporary failure in name resolution
Wrapped exception:
getaddrinfo: Temporary failure in name resolution After restarting puppetmaster, I keep getting the same error message as before:
|
you'll have to execute that as root |
Per the dependencies section of the readme (https://github.com/puppet-community/puppet-network#dependencies) you need to be able to pluginsync the master for this to work; the error that you're seeing indicates that you have faulty DNS or Puppet configuration. Make sure that pluginsync works and that should fix your issue. |
I see this during an rspec run, which I wouldn't expect to have anything to do with a master.
After the first autoload error the remaining routes don't complain about it. Kind of weird. Fixtures and filesystem check out.
Is this related or new behavior? |
When I push the change to the master and run on an agent in noop mode, I get an error but it looks like it wants to try and add the routes. A little concerned about taking noop off, though:
|
as a first guess, i would've suspected rspec-puppet, but who knows. |
Good and bad news! The good: this appears related to LOAD_PATH and rodjek/rspec-puppet#237. This can be tested by modifying a few files (two files in my use case - anywhere there's a "require 'puppetx/filemapper'" line) and telling them where to find puppetx/filemapper. Example:
The bad news: that's clear as mud and only required for rspec-puppet - until the other PR is merged and (hopefully) fixes the LOAD_PATH issue. Modifying all these files could then potentially cause issues in production if the filemapper module is not in the same modulepath as network (one is in the environment and the other in |
A better short term fix is to add this to spec/spec_helper.rb
It's still a bit ... weird ... but has less side effects. |
As far as workarounds go, this one looks alright to me. |
Invoking the tests like this works for me:
|
This seems to be this puppet bug, which has existed for a fair amount of time. If I understood it correctly, My guess is if filemapper were shipped as part of puppet-network it would load it every time since puppet would load puppet-network's puppetx folder. Thoughts? |
It is indeed that bug. Please upvote it, as nobody seems to be paying it any attention at the moment. The problem is that $LOAD_PATH isn't set up before types/providers are loaded, so they can't find their dependencies within modules. Ideally, Puppet would either fix up $LOAD_PATH before loading things, or would provide an alternative to While distributing filemapper with the module would work, it could easily conflict with any other versions installed elsewhere, as the namespace will be shared. |
There seems to be some activity in the puppet bug, sprint and team assignments. Things are looking good. |
\o/ |
The bug still exists puppet-3.8.7 Error 400 on SERVER: Could not autoload puppet/type/network_config: Could not autoload puppet/provider/network_config/redhat: cannot load such file -- puppetx/filemapper |
Has the puppetserver config been changed to allow loading of PuppetX? |
Do you mean "pluginsync" parameter? |
I mean adjusting the |
On Puppet 3.8 I'm currently working around this with a hack module, adding a parser function which affects the Puppetmaster's Ruby environment: require 'puppet/util/autoload'
module Puppet::Parser::Functions
newfunction(:libfix) do |args|
libpath_all_modules = args.shift
libpath_modules = args.shift
env = Puppet.lookup(:current_environment)
moddirs = Puppet::Util::Autoload.module_directories(env)
if libpath_all_modules
add_paths = moddirs
else
add_paths = moddirs.find_all do |path|
modname = path.split('/')[-2]
libpath_modules.include? modname
end
end
add_paths.each do |path|
unless $LOAD_PATH.include? path
$LOAD_PATH << path
end
end
end
end I've then got a manifest which looks like this: # Class to fix LOAD_PATH
class libfix(
$libpath_modules = [],
$libpath_all_modules = true,
) {
# This function doesn't do anything, but it needs to be parsed
libfix($libpath_all_modules, $libpath_modules)
} So you can either Also bear in mind that this will cause pollution between environments as LOAD_PATH is shared (unless you have something that segregates master instances for each environment). |
FYI to anyone with this issue, and your attempting to run this module inside of a branch. You need to make sure your puppet master also gets a run on that same branch or else the necessary PuppetFile modules will not exist server side, even though the ruby code might be on the agent side, it will still fail. |
I've had this issue today: after a reload of the puppetserver, the first run would always fail with this error message. Subsequent runs would succeed, however. To avoid the initial failure, I found that simply running puppet generate types in the environment directory solved this issue. Therefore I don't think this is a bug specifically related to this module. |
I installed the package by calling
puppet module install adrien-network
I've added a simple static entry to a node:
deployment fails with the following error:
filemapper
is installed inside/etc/puppet/modules/filemapper
I'd be happy to help debug the problem. I'm using puppet 3.4.3 & puppet-master 3.4.3.
List of installed packages:
$ sudo puppet module list
/etc/puppet/modules
├── adrien-boolean (v1.0.1)
├── adrien-filemapper (v1.1.2)
├── adrien-network (v0.4.1)
The text was updated successfully, but these errors were encountered: