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

Cannot apply default configuration in Debian 9 #201

Closed
chaim1221 opened this issue Dec 17, 2018 · 3 comments · Fixed by #202
Closed

Cannot apply default configuration in Debian 9 #201

chaim1221 opened this issue Dec 17, 2018 · 3 comments · Fixed by #202

Comments

@chaim1221
Copy link
Contributor

Cookbook version: 2.6.5

Chef-client version: 14.8.12

Platform Details: Debian 9

Scenario: Use iptables instead of ufw

Steps to Reproduce: Create a recipe that uses firewall 'default' with attribute:

default['firewall']['ubuntu_iptables'] = true

Expected Result: iptables is configured with options 'default'

Actual Result:

I, [2018-12-17T14:55:12.425141 #7031]  INFO -- default-debian-9: [2018-12-17T22:55:10+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: firewall[default] (machete.kvm::default line 25) had an error: Mixlib::ShellOut::ShellCommandFailed: service[iptables-persistent] (/tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu1404.rb line 177) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
I, [2018-12-17T14:55:12.425210 #7031]  INFO -- default-debian-9: ---- Begin output of /bin/systemctl --system enable iptables-persistent ----
I, [2018-12-17T14:55:12.425248 #7031]  INFO -- default-debian-9: STDOUT: 
I, [2018-12-17T14:55:12.425279 #7031]  INFO -- default-debian-9: STDERR: Failed to enable unit: File iptables-persistent.service: No such file or directory
I, [2018-12-17T14:55:12.425309 #7031]  INFO -- default-debian-9: ---- End output of /bin/systemctl --system enable iptables-persistent ----
I, [2018-12-17T14:55:12.425338 #7031]  INFO -- default-debian-9: Ran /bin/systemctl --system enable iptables-persistent returned 1
E, [2018-12-17T14:55:12.444482 #7031] ERROR -- default-debian-9: Converge failed on instance <default-debian-9>.

This may be related to #193 but I can't tell because they didn't provide a stack trace. On that note, there is a netfilter-persistent provider in the libraries but for some reason it is using the wrong one.

@welcomebot
Copy link

Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

@chaim1221
Copy link
Contributor Author

I think what's happening is that it's calling the wrong provider because I'm using Debian; I believe it thinks I'm using an OS < 14.04:

https://github.com/chef-cookbooks/firewall/blob/master/libraries/provider_firewall_iptables_ubuntu.rb#L26

@chaim1221
Copy link
Contributor Author

(I have forked and think I might have a fix)

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

Successfully merging a pull request may close this issue.

2 participants