puppetlabs-firewall icon indicating copy to clipboard operation
puppetlabs-firewall copied to clipboard

delete doesn't execute iptables with `--wait`

Open stek29 opened this issue 2 years ago • 0 comments

Describe the Bug

when deleting iptables rules, iptables command is executed without --wait option.

Expected Behaviour

--wait should be passed to iptables command

Steps to Reproduce

Steps to reproduce the behavior:

  1. Make this module delete a rule
  2. see the command it runs -- it won't have --wait in it.

Environment

The issue is still present in current main branch as of reporting

Additional Context

from my understanding, the issue is caused by the fact delete doesn't include general_args: https://github.com/puppetlabs/puppetlabs-firewall/blob/38bf1c19a1e143a302c45da2f22413a1d94e64f1/lib/puppet/provider/firewall/iptables.rb#L378-L382 and wait is only added in general_args: https://github.com/puppetlabs/puppetlabs-firewall/blob/38bf1c19a1e143a302c45da2f22413a1d94e64f1/lib/puppet/provider/firewall/iptables.rb#L833-L839C8

stek29 avatar May 23 '23 20:05 stek29