Closed Stromweld closed 7 years ago
I believe this has to do with the change in chef-client 13 for amazon linux to now be it's own platform_family. Not totally sure what needs to be fixed in the cookbook however. I thought it may simply be needing amazon added to the array on this line: https://github.com/chef-cookbooks/firewall/blob/master/libraries/provider_firewall_iptables.rb#L25
But I'm sure there is more to it than that.
Hi there @Stromweld -- we haven't supported Amazon Linux up to this point. I'd be glad to review PRs, but there's a number of differences that I'm aware of:
I think this would take more work to support than just a simple bugfix. I'll leave this open as an enhancement. 👍
According to your metadata file this cookbook is supposed to support amazon linux os. It simply uses iptables. Up until chef-client 13 amazon linux had attribute platform_family = 'rhel' but with 13's release they made amazon linux it's own platform_family now and this has made a lot of multiplatform cookbooks have to update case statements using platform_family to add rhel and amazon.
I was trying to figure out how the cookbook determines which OS is associated with which default firewall app. From what I could figure it might be simply adding amazon to this line https://github.com/chef-cookbooks/firewall/blob/master/libraries/provider_firewall_iptables.rb#L25.
I can try it out and test to see if it works.
According to your metadata file this cookbook is supposed to support amazon linux os.
@Stromweld it looks like that was added to all cookbooks under chef-cookbooks
over a year ago without anyone checking to see if it's true, unfortunately -- https://github.com/chef-cookbooks/firewall/commit/95f322be1a6065f3ec42f386b4f654adc5b1aec9. I'll fix that 👍
It simply uses iptables.
There's actually a lot of variation in iptables between versions and amongst Linux distributions. These are typically how the service is managed, package names, how they split up ipv4 and ipv6 (combined or separate), and where config files live. We're actually maintaining three different iptables variations already in this cookbook, due to distro differences -- and I can already see that Amazon Linux has different packages than the others (see #154).
Ok that makes sense then. Thanks.
Marking this on hold until we have someone who can work on this.
Consolidating the request to support Amazon Linux under #172.
Cookbook version
2.6.1
Chef-client version
13.0.118
Platform Details
System Info:
Scenario:
disable OS specific firewall
Steps to Reproduce:
create amazon linux instance with firewall::disable_firewall in it's runlist.
Expected Result:
iptables service disabled
Actual Result: