chr4-cookbooks / iptables-ng

Cookbook to maintain iptables rules and policies on different platforms, respecting the way the os handles these settings.
GNU General Public License v3.0
38 stars 32 forks source link

Deprecated resource cloning in Chef 13 #69

Closed madhatter closed 6 years ago

madhatter commented 7 years ago

Hi, when moving to chef12 I got lots of warnings using iptables-ng resources:

Cloning resource attributes for iptables_ng_chain[attribute-policy-OUTPUT] from prior resource
Previous iptables_ng_chain[attribute-policy-OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
Current  iptables_ng_chain[attribute-policy-OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for iptables_ng_chain[attribute-policy-INPUT] from prior resource
Previous iptables_ng_chain[attribute-policy-INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
Current  iptables_ng_chain[attribute-policy-INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for iptables_ng_chain[attribute-policy-FORWARD] from prior resource
Previous iptables_ng_chain[attribute-policy-FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
Current  iptables_ng_chain[attribute-policy-FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for iptables_ng_chain[attribute-policy-PREROUTING] from prior resource
Previous iptables_ng_chain[attribute-policy-PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
Current  iptables_ng_chain[attribute-policy-PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for iptables_ng_chain[attribute-policy-POSTROUTING] from prior resource
Previous iptables_ng_chain[attribute-policy-POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
Current  iptables_ng_chain[attribute-policy-POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/recipes/default.rb:33:in `block (2 levels) in from_file'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/filter/INPUT] from prior resource
Previous directory[/etc/iptables.d/filter/INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/filter/INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/filter/INPUT/default] from prior resource
Previous file[/etc/iptables.d/filter/INPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/filter/INPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/filter/OUTPUT] from prior resource
Previous directory[/etc/iptables.d/filter/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/filter/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/filter/OUTPUT/default] from prior resource
Previous file[/etc/iptables.d/filter/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/filter/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/filter/FORWARD] from prior resource
Previous directory[/etc/iptables.d/filter/FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/filter/FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/filter/FORWARD/default] from prior resource
Previous file[/etc/iptables.d/filter/FORWARD/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/filter/FORWARD/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/nat/OUTPUT] from prior resource
Previous directory[/etc/iptables.d/nat/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/nat/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/nat/OUTPUT/default] from prior resource
Previous file[/etc/iptables.d/nat/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/nat/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/nat/PREROUTING] from prior resource
Previous directory[/etc/iptables.d/nat/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/nat/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/nat/PREROUTING/default] from prior resource
Previous file[/etc/iptables.d/nat/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/nat/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/nat/POSTROUTING] from prior resource
Previous directory[/etc/iptables.d/nat/POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/nat/POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/nat/POSTROUTING/default] from prior resource
Previous file[/etc/iptables.d/nat/POSTROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/nat/POSTROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/mangle/INPUT] from prior resource
Previous directory[/etc/iptables.d/mangle/INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/mangle/INPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/mangle/INPUT/default] from prior resource
Previous file[/etc/iptables.d/mangle/INPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/mangle/INPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/mangle/OUTPUT] from prior resource
Previous directory[/etc/iptables.d/mangle/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/mangle/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/mangle/OUTPUT/default] from prior resource
Previous file[/etc/iptables.d/mangle/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/mangle/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/mangle/FORWARD] from prior resource
Previous directory[/etc/iptables.d/mangle/FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/mangle/FORWARD]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/mangle/FORWARD/default] from prior resource
Previous file[/etc/iptables.d/mangle/FORWARD/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/mangle/FORWARD/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/mangle/PREROUTING] from prior resource
Previous directory[/etc/iptables.d/mangle/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/mangle/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/mangle/PREROUTING/default] from prior resource
Previous file[/etc/iptables.d/mangle/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/mangle/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/mangle/POSTROUTING] from prior resource
Previous directory[/etc/iptables.d/mangle/POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/mangle/POSTROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/mangle/POSTROUTING/default] from prior resource
Previous file[/etc/iptables.d/mangle/POSTROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/mangle/POSTROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/raw/OUTPUT] from prior resource
Previous directory[/etc/iptables.d/raw/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/raw/OUTPUT]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/raw/OUTPUT/default] from prior resource
Previous file[/etc/iptables.d/raw/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/raw/OUTPUT/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for directory[/etc/iptables.d/raw/PREROUTING] from prior resource
Previous directory[/etc/iptables.d/raw/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
Current  directory[/etc/iptables.d/raw/PREROUTING]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:41:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Cloning resource attributes for file[/etc/iptables.d/raw/PREROUTING/default] from prior resource
Previous file[/etc/iptables.d/raw/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
Current  file[/etc/iptables.d/raw/PREROUTING/default]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/chain.rb:50:in `edit_chain'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.
  Default value "FORWARD:filter:wlan_accept" is invalid for property chain of resource iptables_ng_chain. In Chef 13 this will become an error: Option chain's value FORWARD:filter:wlan_accept does not match regular expression /^[\w-]{1,29}$/. at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/rule.rb:42:in `block in edit_rule'
   See https://docs.chef.io/deprecations_custom_resource_cleanups.html for further details.
  Cloning resource attributes for iptables_ng_chain[FORWARD:filter:wlan_accept] from prior resource
Previous iptables_ng_chain[FORWARD:filter:wlan_accept]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/rule.rb:42:in `block in edit_rule'
Current  iptables_ng_chain[FORWARD:filter:wlan_accept]: /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/rule.rb:42:in `block in edit_rule' at 1 location:
    - /home/madhatter/local-mode-cache/cache/cookbooks/iptables-ng/providers/rule.rb:42:in `block in edit_rule'
   See https://docs.chef.io/deprecations_resource_cloning.html for further details.

Already took a look into the files, but I wasn't able to fix it. So I hope you are still maintaining the cookbook.

chr4 commented 6 years ago

This was fixed back in v3.0.1. Forgot to close this :)