Skip to content
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

No such file to load #78

Closed
uniwan-benoni opened this issue Aug 16, 2016 · 3 comments
Closed

No such file to load #78

uniwan-benoni opened this issue Aug 16, 2016 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@uniwan-benoni
Copy link

After upgrading to version 3.1.0, I receive this error when applying firewalld configuration on a puppet agent:

Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/firewalld_zone: Could not autoload puppet/provider/firewalld_rich_rule/firewall_cmd: no such file to load -- puppet/provider/firewalld at /etc/puppetlabs/code/environments/development/modules/firewalld/manifests/init.pp:99:7 on node centos7

After some digging into Google and the code, updating puppet agent and server, reinstall the module, I found the correction to make:
Just modify in the providers the require statement from:

require 'puppet/provider/firewalld'

to:

require File.dirname(__FILE__).concat('/../firewalld.rb')

With this correction, the puppet firewalld configuration apply correctly.

Here is the diff for the providers:

Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_chain/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_chain/firewall_cmd.rb     2016-08-16 17:26:29.656882277 +0200
+++ /tmp/puppet-file20160816-16379-5xe6ct       2016-08-16 17:30:50.014486783 +0200
@@ -1,5 +1,5 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_direct_chain).provide(:firewall_cmd, :parent => Puppet::Provider::Firewalld) do
   desc "Provider for managing firewalld direct chains using firewall-cmd"
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_passthrough/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_passthrough/firewall_cmd.rb       2016-08-16 15:53:20.913345322 +0200
+++ /tmp/puppet-file20160816-16379-l0y19i       2016-08-16 17:30:50.270489318 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_direct_passthrough).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_purge/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_purge/firewall_cmd.rb     2016-08-16 15:53:21.181347408 +0200
+++ /tmp/puppet-file20160816-16379-1md7lfh      2016-08-16 17:30:50.492491513 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_direct_purge).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_rule/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_direct_rule/firewall_cmd.rb      2016-08-16 15:53:21.442349438 +0200
+++ /tmp/puppet-file20160816-16379-1flplrq      2016-08-16 17:30:50.715493722 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_direct_rule).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_port/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_port/firewall_cmd.rb     2016-08-16 15:53:21.716351574 +0200
+++ /tmp/puppet-file20160816-16379-1fbz56r      2016-08-16 17:30:51.172498245 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_port).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_rich_rule/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_rich_rule/firewall_cmd.rb        2016-08-16 15:53:22.007353840 +0200
+++ /tmp/puppet-file20160816-16379-1g0yoph      2016-08-16 17:30:51.414500643 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_rich_rule).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_service/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_service/firewall_cmd.rb  2016-08-16 15:53:22.267355863 +0200
+++ /tmp/puppet-file20160816-16379-1forbol      2016-08-16 17:30:51.638502858 +0200
@@ -1,5 +1,4 @@
 require 'puppet'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

 Puppet::Type.type(:firewalld_service).provide(
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_zone/firewall_cmd.rb]/content:
--- /opt/puppetlabs/puppet/cache/lib/puppet/provider/firewalld_zone/firewall_cmd.rb     2016-08-16 15:53:22.524357864 +0200
+++ /tmp/puppet-file20160816-16379-13wpkzv      2016-08-16 17:30:51.863505088 +0200
@@ -1,6 +1,5 @@
 require 'puppet'
 require 'puppet/type'
-require 'puppet/provider/firewalld'
+require File.dirname(__FILE__).concat('/../firewalld.rb')

Best regards,
Bénoni

@crayfishx
Copy link
Contributor

@uniwan-benoni Are you running with Puppet agent or puppet apply?

@crayfishx crayfishx added bug Something isn't working accepted labels Aug 16, 2016
@crayfishx crayfishx added this to the 3.1.1 milestone Aug 16, 2016
@crayfishx
Copy link
Contributor

@uniwan-benoni #79 should fix this for you - I'll push it as a bug fix release as soon as travis checks are complete...

crayfishx added a commit that referenced this issue Aug 16, 2016
#78 changed load paths for relative paths
@crayfishx
Copy link
Contributor

@uniwan-benoni I've released this patch as 3.1.1 https://forge.puppet.com/crayfishx/firewalld/3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants