Skip to content
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

Firewall names can't have an underscore "_" in them. #1173

Open
dlware opened this issue Oct 31, 2023 · 0 comments
Open

Firewall names can't have an underscore "_" in them. #1173

dlware opened this issue Oct 31, 2023 · 0 comments

Comments

@dlware
Copy link

dlware commented Oct 31, 2023

Describe the Bug

If a firewall name has an underscore in it, it doesn't match the current regex for firewall.name resulting in an error.

Error: Failed to apply catalog: Parameter name failed on Firewall[040_apache_status_inbound 1xx.xxx.xxx.xx]: firewall.name expects a match for Pattern[/(^\d+(?:[ \t-]\S+)+$)/], got '040_apache_status_inbound 1xx.xxx.xxx.xx'

Expected Behavior

Underscores have been supported in the past and are supported by the underlying systems. Would like them to continue to be supported.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create or update a firewall name with an underscore.
  2. run puppet.

Environment

  • Version 7.0.2
  • Puppet version 7.25,0-1
  • Platform Ubuntu 20.04 (tested on 20.04 and 22.04)

Additional Context

Regex in lib/puppet/type/firewall.rb can be updated from:
type: 'Pattern[/(^\d+(?:[ \t-]\S+)+$)/]',
to:
type: 'Pattern[/(^\d+(?:[ \t-_]\S+)+$)/]',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants