From: lionce Date: Thu, 14 Nov 2019 15:08:21 +0000 (+0200) Subject: MODULES-8413 fix delete chains which is INTERNAL_CHAINS X-Git-Tag: v2.2.0~4^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7464dfbdd14ecefe71c27e30901020600bb55bce;p=puppet-modules%2Fpuppetlabs-firewall.git MODULES-8413 fix delete chains which is INTERNAL_CHAINS --- diff --git a/lib/puppet/provider/firewallchain/iptables_chain.rb b/lib/puppet/provider/firewallchain/iptables_chain.rb index 5bc03c3..6182283 100644 --- a/lib/puppet/provider/firewallchain/iptables_chain.rb +++ b/lib/puppet/provider/firewallchain/iptables_chain.rb @@ -62,9 +62,10 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do if chain =~ INTERNAL_CHAINS # can't delete internal chains warning "Attempting to destroy internal chain #{@resource[:name]}" + else + debug "Deleting chain #{chain} on table #{table}" + t.call ['-t', table, '-X', chain] end - debug "Deleting chain #{chain} on table #{table}" - t.call ['-t', table, '-X', chain] end end