{"action":"closed","issue":{"url":"https://api.github.com/repos/chef-cookbooks/firewall/issues/91","labels_url":"https://api.github.com/repos/chef-cookbooks/firewall/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/firewall/issues/91/comments","events_url":"https://api.github.com/repos/chef-cookbooks/firewall/issues/91/events","html_url":"https://github.com/chef-cookbooks/firewall/issues/91","id":106029616,"number":91,"title":"ipv6 disable issues","user":{"login":"jgrill","id":1129205,"avatar_url":"https://avatars.githubusercontent.com/u/1129205?v=3","gravatar_id":"","url":"https://api.github.com/users/jgrill","html_url":"https://github.com/jgrill","followers_url":"https://api.github.com/users/jgrill/followers","following_url":"https://api.github.com/users/jgrill/following{/other_user}","gists_url":"https://api.github.com/users/jgrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrill/subscriptions","organizations_url":"https://api.github.com/users/jgrill/orgs","repos_url":"https://api.github.com/users/jgrill/repos","events_url":"https://api.github.com/users/jgrill/events{/privacy}","received_events_url":"https://api.github.com/users/jgrill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-11T15:10:56Z","updated_at":"2015-09-14T09:25:47Z","closed_at":"2015-09-14T09:25:47Z","body":"I'm working on CentOS 6.6 with iptables and ipv6 disabled (kernel module not loaded) and have encountered two issues.\r\n\r\nFirst, the new \"ipv6_enabled\" parameter to the firewall resource precludes including the default recipe, if you need to set it to false. This is due to the firewall resource being called with the install action in default.rb. Maybe this could be a feature request to have an attribute to turn on/off ipv6 support rather then having to include it as a parameter to the firewall resource.\r\n\r\nSecond, I'm getting undefined method `key?' for nil:NilClass with the example below. This only occurs when disabling ipv6 via the firewall resource.\r\n\r\nMy wrapper...\r\n\r\n```ruby\r\nfirewall 'default' do\r\n  action :install\r\n  ipv6_enabled false\r\nend\r\n\r\nfirewall_rule 'allow world to ssh' do\r\n  port 22\r\n  source '0.0.0.0/0'\r\nend\r\n\r\n# allow established connections\r\nfirewall_rule 'established' do\r\n  stateful [:related, :established]\r\n  protocol :none # explicitly don't specify protocol\r\n  command :allow\r\nend\r\n[snip]\r\n```\r\n\r\nLog output...\r\n```\r\n[snip]\r\nCompiling Cookbooks...\r\n       Converging 8 resources\r\n       Recipe: efx_firewall::default\r\n\r\n           - install iptables and enable/start services\r\n        (up to date)\r\n         * file[create empty /etc/sysconfig/iptables] action create (skipped due to not_if)\r\n        (up to date)\r\n        (up to date)\r\n         * firewall_rule[allow world to ssh] action create\r\n\r\n         * firewall_rule[established] action create\r\n\r\n           ================================================================================\r\n           Error executing action `create` on resource 'firewall_rule[established]'\r\n           ================================================================================\r\n\r\n           NoMethodError\r\n           -------------\r\n           undefined method `key?' for nil:NilClass\r\n\r\n           Cookbook Trace:\r\n           ---------------\r\n           /tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_rule_iptables.rb:51:in `block (2 levels) in <class:FirewallRuleIptables>'\r\n           /tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_rule_iptables.rb:45:in `each'\r\n           /tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_rule_iptables.rb:45:in `block in <class:FirewallRuleIptables>'\r\n\r\n           Resource Declaration:\r\n           ---------------------\r\n           # In /tmp/kitchen/cache/cookbooks/efx_firewall/recipes/default.rb\r\n\r\n            22: firewall_rule 'established' do\r\n            23:   stateful [:related, :established]\r\n            24:   protocol :none # explicitly don't specify protocol\r\n            25:   command :allow\r\n            26: end\r\n            27:\r\n            28: # Allow all loopback traffic\r\n            29: firewall_rule 'loopback' do\r\n            30: \tinterface 'lo'\r\n            31: \tcommand :allow\r\n            32: end\r\n            33:\r\n            34: execute 'dummy-delay-iptables-save' do\r\n            35: \tcommand '/bin/true'\r\n            36: \tnotifies :run, 'execute[iptables-save]', :delayed\r\n            37: end\r\n            38:\r\n            39: execute 'iptables-save' do\r\n            40:   command 'service iptables save'\r\n            41:   action :nothing\r\n            42: end\r\n\r\n           Compiled Resource:\r\n           ------------------\r\n           # Declared in /tmp/kitchen/cache/cookbooks/efx_firewall/recipes/default.rb:22:in `from_file'\r\n\r\n           firewall_rule(\"established\") do\r\n             action [:create]\r\n             updated true\r\n             updated_by_last_action true\r\n             retries 0\r\n             retry_delay 2\r\n             default_guard_interpreter :default\r\n             declared_type :firewall_rule\r\n             cookbook_name \"efx_firewall\"\r\n             recipe_name \"default\"\r\n             stateful [:related, :established]\r\n             protocol :none\r\n             command :allow\r\n             firewall_name \"default\"\r\n             direction :in\r\n             description \"established\"\r\n             position 50\r\n           end\r\n\r\n\r\n           * file[/etc/sysconfig/iptables] action create (up to date)\r\n            (up to date)\r\n\r\n       Running handlers:\r\n       [2015-09-11T14:54:40+00:00] ERROR: Running exception handlers\r\n       Running handlers complete\r\n       [2015-09-11T14:54:40+00:00] ERROR: Exception handlers complete\r\n       Chef Client failed. 2 resources updated in 4.527059018 seconds\r\n       [2015-09-11T14:54:40+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out\r\n       [2015-09-11T14:54:40+00:00] ERROR: firewall_rule[established] (efx_firewall::default line 22) had an error: NoMethodError: undefined method `key?' for nil:NilClass\r\n       [2015-09-11T14:54:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n```\r\n"}}