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

Service filename bugfix #266

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

trevor-vaughan
Copy link
Collaborator

This started out as a fix for the custom service filename but spiraled a
bit further during debugging.

  • Auto-correct the filename for firewalld::custom_service
  • Add a function firewalld::safe_filename for munging filenames to
    safely work with firewalld. The allowed characters were determined by
    experimentation and are not documented.
  • Ensure that firewalld_zone resources automatically reload the firewall
  • Ensure that firewalld_zone names are no longer than 17 characters per
    the manual
  • Create firewalld::reload and firewalld::reload::complete classes to
    allow easier resource chaining
  • Fix spacing in init.pp
  • Ensure that all of the Execs that call firewall-cmd happen after the
    service is running
  • Ensure that all permanent configuration changes happen before the
    firewalld service is started/restarted. This is critical if switching
    from nft to iptables due to the segfault bug in nft
  • Ensure that all custom service declarations happen before all
    firewalld_zone resources are triggered. This is automatic in all
    native types
  • Updated the service.xml.erb to an EPP file

Closes #265

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@vox-pupuli-tasks
Copy link

Dear @trevor-vaughan, thanks for the PR!

This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

functions/safe_filename.pp Outdated Show resolved Hide resolved
This started out as a fix for the custom service filename but spiraled a
bit further during debugging.

* Auto-correct the filename for firewalld::custom_service
* Add a function `firewalld::safe_filename` for munging filenames to
  safely work with firewalld. The allowed characters were determined by
  experimentation and are not documented.
* Ensure that firewalld_zone resources automatically reload the firewall
* Ensure that firewalld_zone names are no longer than 17 characters per
  the manual
* Create firewalld::reload and firewalld::reload::complete classes to
  allow easier resource chaining
* Fix spacing in init.pp
* Ensure that all of the Execs that call firewall-cmd happen after the
  service is running
* Ensure that all permanent configuration changes happen before the
  firewalld service is started/restarted. This is critical if switching
  from nft to iptables due to the segfault bug in nft
* Ensure that all custom service declarations happen before all
  firewalld_zone resources are triggered. This is automatic in all
  native types
* Updated the service.xml.erb to an EPP file

Closes voxpupuli#265
@trevor-vaughan
Copy link
Collaborator Author

@bastelfreak Could have sworn that I fixed all of those the first time :-|

Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, but i cannot really tell if its backwards incompatible or not

@trevor-vaughan
Copy link
Collaborator Author

@bastelfreak The API was not changed and the entire test suite that we have in simp/iptables did not have to be modified at all with these changes.

@trevor-vaughan trevor-vaughan merged commit 80527e7 into voxpupuli:master Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

firewalld::custom_service creates files with invalid names
4 participants