Skip to content

Commit

Permalink
Back out "'Exclude fedora from slowroll' and 'Setup slowroll for ipta…
Browse files Browse the repository at this point in the history
…bles-legacy'"

Summary:
Original commit changeset: 78c2449a4e70

Original Phabricator Diff: D56079700
***
Back out "[S409410][fb_iptables] "

Original commit changeset: e64d9b00c703

Original Phabricator Diff: D55988297

***
This cookbook is open source so we cannot use slowroll here

Differential Revision: D56272737

fbshipit-source-id: bf4a78b3a4cbe7607357a6d25c76f5e911fdf60c
  • Loading branch information
Raymond Colebaugh authored and facebook-github-bot committed Apr 18, 2024
1 parent 3dfdb9f commit d81f5ca
Showing 1 changed file with 14 additions and 27 deletions.
41 changes: 14 additions & 27 deletions cookbooks/fb_iptables/recipes/packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,22 @@
# limitations under the License.
#

if node.centos? && !(node.centos7? || node.centos8?)
slowroll_name = 'iptables-legacy'
node.default['fb_slowroll'][slowroll_name]['phases'] =
FB::Slowroll::PhaseTemplates.slow_start(node)
node.default['fb_slowroll'][slowroll_name]['export_json'] = true

fb_slowroll slowroll_name do
notifies :run, 'execute[reload iptables]'
notifies :run, 'execute[reload ip6tables]'
end
if (node.centos? && !(node.centos7? || node.centos8?)) || node.fedora?
packages = ['iptables-legacy']
else
if node.fedora?
packages = ['iptables-legacy']
else
packages = ['iptables']
end

if node.ubuntu?
packages << 'iptables-persistent'
else
packages << 'iptables-services'
end
packages = ['iptables']
end
if node.ubuntu?
packages << 'iptables-persistent'
else
packages << 'iptables-services'
end

package packages do
only_if { node['fb_iptables']['manage_packages'] }
action :upgrade
notifies :run, 'execute[reload iptables]'
notifies :run, 'execute[reload ip6tables]'
end
package packages do
only_if { node['fb_iptables']['manage_packages'] }
action :upgrade
notifies :run, 'execute[reload iptables]'
notifies :run, 'execute[reload ip6tables]'
end

execute 'reload iptables' do
Expand Down

0 comments on commit d81f5ca

Please sign in to comment.