Closed bchurchill closed 3 years ago
doing #67 and removing the extra shell_out
layer would probably help this a lot
Hi,
I am closing this as it relates to an old version of the cookbook which has since been fundamentally changed. If you still have the issue with the latest version please could you open a new issue,
Thanks
Cookbook version
4.3.4
Chef-client version
13.8.5-1
Platform Details
debian-8, debian-9
Scenario:
If the iptables rules specified in the cookbook/recipe are invalid, the error message from a chef-client client run should identify the text of the rule that failed to apply.
Steps to Reproduce:
Expected Result:
chef-client should report the standard output of /usr/sbin/rebuild-iptables, and this output should include the specific iptables rule that failed to apply (in this case
-A DROP
, because it has no chain name).Actual Result:
iptables-apply indeed generates the message,
where line 5 of this file is,
But
rebuild-iptables
doesn't output this last piece of information:Expected process to exit with [0], but received '1' ---- Begin output of /usr/sbin/rebuild-iptables ---- STDOUT: STDERR: iptables-restore: line 5 failed /usr/sbin/rebuild-iptables:137:in `': /usr/sbin/rebuild-iptables: failed to install iptables rules (RuntimeError)
---- End output of /usr/sbin/rebuild-iptables ----
Ran /usr/sbin/rebuild-iptables returned 1