Skip to content

Conversation

@nabertrand
Copy link
Contributor

Summary

Some global variable names were re-used between the firewall and firewallchain providers. This causes intermittent catalog application failures.

The proposed fix is to prefix all firewall global variables with fw_ and all firewallchain global variables with fwc_.

Additional Context

For example, if the firewallchain provider code is loaded after the firewall provider code, the $list_command global variable value loses the iptables and ipt6ables keys and values. E.g.

$list_command = {
'IPv4' => 'iptables-save',
'iptables' => 'iptables-save',
'IPv6' => 'ip6tables-save',
'ip6tables' => 'ip6tables-save'
}

becomes
$list_command = {
'IPv4' => 'iptables-save',
'IPv6' => 'ip6tables-save'
}

Then when the firewall provider tries to process a rule that has the iptables protocol, the provider is unable to lookup the current rules because $list_command['iptables'] is no longer defined.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

Some global variable names were re-used between the firewall and firewallchain
providers. This causes intermittent catalog application failures.

Prefix all firewall global variables with 'fw_' and firewallchain global
variables with 'fwc_'.
@nabertrand nabertrand requested a review from a team as a code owner July 2, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant