salt icon indicating copy to clipboard operation
salt copied to clipboard

salt.states.iptables applies rules when test=True has been passed

Open ikanobori opened this issue 11 years ago • 1 comments

When I have a statefile with multiple iptables rules in it and I run it on a client and the second or third rule fails you are left with a iptables state that is broken. This happens with test=True.

Suggested: maybe apply all rules to a different table and see if the commands succeed?

In this case my initital firewall state sets all policies to drop on all chains in all tables. If afterwards the next rule fails you are left with a machine that can't talk back anymore.

This is especially common when you have a mixture of salt minion versions as it seems:

  • comment: Foo bar
  • comment: "Foo bar"
  • comment: "'Foo bar'"

Behave differently across them.

Andreas asked me to mention him in this since we chatted about it on IRC for a minute; @anlutro

I can provide a small usecase later today.

The tested against version is: salt 2015.5.3 (Lithium)

ikanobori avatar Oct 27 '15 10:10 ikanobori

Ran another test against all the minions and the only minions were this went wrong were 2014.x versions. Closing this as it seems to not apply for newer minions.

ikanobori avatar Oct 27 '15 17:10 ikanobori