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

Issue with firewall in 3.0 #128

Closed
kbarber opened this issue Feb 23, 2013 · 16 comments
Closed

Issue with firewall in 3.0 #128

kbarber opened this issue Feb 23, 2013 · 16 comments

Comments

@kbarber
Copy link
Contributor

kbarber commented Feb 23, 2013

Although I can't replicate this in 3.1.0, Puppet 3.0.1 used to have a problem with method_missing. Has this just disappeared or is something up with that version of Puppet?

@kbarber
Copy link
Contributor Author

kbarber commented Feb 25, 2013

I can't replicate this, tested:

  • Debian 7.0, Ruby 1.9.3, Puppet 3.0.0, 3.0.1, 3.1.0.
  • Centos 6.3, Ruby 1.8.7, Puppet 3.0.0, 3.0.1, 3.1.0.

@kbarber kbarber closed this as completed Feb 25, 2013
@ruckc
Copy link

ruckc commented Feb 25, 2013

I had an issue when moved to 3.0, the pull request #98 fixed it.

@kbarber
Copy link
Contributor Author

kbarber commented Feb 25, 2013

@ruckc well, I can't replicate it even on 3.0.2 (centos 6):

puppet --version

3.0.2

puppet apply /tmp/foo.pp

Notice: /Firewall[050 foo]/ensure: created
Notice: Finished catalog run in 0.12 seconds

puppet module list

/etc/puppet/modules
├── puppetlabs-apt (v1.1.0)
├── puppetlabs-firewall (v0.1.0)
├── puppetlabs-postgresql (v2.1.0)
├── puppetlabs-stdlib (v3.2.0)
└── ripienaar-concat (v0.2.0)

@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

I am running puppet 3.1.0 and am still encountering this issue.

I'm not sure what you're trying to duplicate the issue, but I get it when I change the port number of an existing firewall rule.

@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

@phemmer what issue exactly? Like I said - if its the method_missing one I can't replicate it on a clean system - there must be something environmental that is special to cause this to happen.

@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

Error: /Firewall[100 nginx]/dport: change from 80 to 80,443 failed: The iptables provider can not handle attribute dport

EDIT: The pull request (#98) mentioned by rucks does fix the issue.

@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

Aah so its on change, okay ... I can work with that @phemmer thanks for the info, however #98 is too static - we need a better fix. Let me fix it.

@kbarber kbarber reopened this Feb 28, 2013
@ruckc
Copy link

ruckc commented Feb 28, 2013

#98 worked for me without issue.

Curtis Ruck
Anytime: 210-857-1126

On Thu, Feb 28, 2013 at 4:04 PM, Ken Barber notifications@github.comwrote:

Aah so its on change, okay ... I can work with that @phemmerhttps://github.com/phemmerthanks for the info, however
#98 #98 is too
static - we need a better fix. Let me fix it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/128#issuecomment-14257498
.

kbarber added a commit to kbarber/puppetlabs-firewall that referenced this issue Feb 28, 2013
Previously method_missing was enough to create dynamic methods but Puppet 3.0
broke that functionality. So here we used 'define_method' instead to work
around that.

Signed-off-by: Ken Barber <ken@bob.sh>
kbarber added a commit that referenced this issue Feb 28, 2013
* ticket/master/128-puppet_30_broke_method_missing:
  (GH-128) Change method_missing to define_method
@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

@ruckc except when you hit a parameter that someone forgot to add to that static list I bet. You just haven't hit that particular case.

Anyway, I've merged in a fix that uses the resource_map.

@kbarber kbarber closed this as completed Feb 28, 2013
@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

Now I'm getting this:

Error: /Firewall[100 nginx]/dport: change from 80 to 80,443 failed: wrong number of arguments (1 for 0)

I'm qubit on irc if that makes this easier.

@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

Can you run it with a --trace?

@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

Error: wrong number of arguments (1 for 0)
/var/lib/puppet/lib/puppet/provider/firewall/iptables.rb:76:in `block (3 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/puppet/property.rb:174:in `call_provider'
/usr/lib/ruby/vendor_ruby/puppet/property.rb:494:in `set'
/usr/lib/ruby/vendor_ruby/puppet/property.rb:572:in `sync'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:114:in `apply_parameter'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:62:in `block in perform_changes'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:60:in `each'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:60:in `perform_changes'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:133:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:48:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:83:in `eval_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block (2 levels) in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `block in thinmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:103:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:382:in `traverse'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:98:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:144:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:122:in `block in apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:179:in `block in benchmark'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:121:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:179:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (5 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run'
/usr/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:338:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:312:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `<main>'
Error: /Firewall[100 nginx]/dport: change from 80 to 80,443 failed: wrong number of arguments (1 for 0)

@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

@ruckc try again on master - looks like it was a Ruby 1.9 v 1.8 syntax mistake on my part.

@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

@kbarber I'm assuming you meant to me :-)
Did you push that to github? I'm not seeing anything on puppetlabs/puppetlabs-firewall

@kbarber
Copy link
Contributor Author

kbarber commented Feb 28, 2013

@phemmer yeah I'm just not with it today. Okay I've pushed it.

@phemmer
Copy link
Contributor

phemmer commented Feb 28, 2013

Yup, all good now. Thanks :-)

floatingatoll pushed a commit to floatingatoll/puppetlabs-firewall that referenced this issue Mar 18, 2013
Previously method_missing was enough to create dynamic methods but Puppet 3.0
broke that functionality. So here we used 'define_method' instead to work
around that.

Signed-off-by: Ken Barber <ken@bob.sh>
floatingatoll pushed a commit to floatingatoll/puppetlabs-firewall that referenced this issue Dec 3, 2013
Previously method_missing was enough to create dynamic methods but Puppet 3.0
broke that functionality. So here we used 'define_method' instead to work
around that.

Signed-off-by: Ken Barber <ken@bob.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants