Open vladionescu opened 5 years ago
👍 Thanks for throwing this together! I'll check out the PR
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no longer marked as stale.
Removing the fixed label since the PR was closed. @vladionescu can/will you open a PR against master?
I submitted this issue with a fix nearly 10 months ago, and it appears to still be broken.
Does Salt plan on fixing this and properly supporting iptables?
@vladionescu yes, I saw that PR was against the develop
branch and since time has passed we are now making changes in the master
branch and I wondered if you could open your same PR against the master
branch, no is an acceptable answer. Since you opened the original PR I wanted to at least involve you in the conversation.
https://github.com/saltstack/salt/blob/705e8cca0b9ad6441c3884e76798cac1ff7859d7/salt/modules/iptables.py#L977-L994
If modules.iptables.get_saved_rules() is called without an explicit dump file path (generated by iptables -S or iptables-save), then it assumes the default OS' iptables config path and tries to read it, but does not handle the case where that file doesn't exist.
All this happens at the top of modules.iptables._parse_conf().
Here's the unhandled exception when this happens:
And the state that triggers it:
The target minion (sys-firewall) indeed doesn't have anything at /etc/sysconfig/iptables
I have a fix for this, just need to fork and send PR.