-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-439) Work around existing rules #286
Conversation
The firewall resource is not intended to be used with rules that are not also managed by puppet; the behavior when doing so was undefined. This is an attempt to make it more defined. The behavior is that any rule added by puppet will be inserted in its given order in relation to the other rules managed by puppet, but ahead of any rules not managed by puppet.
| @@ -408,8 +408,39 @@ def insert_order | |||
| # No rules at all? Just bail now. | |||
| return 1 if rules.empty? | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the rule to edit is on a different chain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved. Firewall doesn't support moving rules between chains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha, I love this "Resolved: WONTFIX." :D
(MODULES-439) Work around existing rules
In puppetlabs#286 we fixed rule offset detection for existing managed and unmanaged rules, but in the case where the first rule in a chain was unmanaged, managed rules were still being inserted under it. This patch changes it so that if the first rule detected for offset is unmanaged, then we should insert before that for more consistent behavior.
Fix for #286 for pre-existing rules at the start of a chain
|
I don't understand how this change is supposed to benefit me. |
In puppetlabs#286 we fixed rule offset detection for existing managed and unmanaged rules, but in the case where the first rule in a chain was unmanaged, managed rules were still being inserted under it. This patch changes it so that if the first rule detected for offset is unmanaged, then we should insert before that for more consistent behavior.
The firewall resource is not intended to be used with rules that are not
also managed by puppet; the behavior when doing so was undefined. This
is an attempt to make it more defined.
The behavior is that any rule added by puppet will be inserted in its
given order in relation to the other rules managed by puppet, but ahead
of any rules not managed by puppet.