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

Make testing and installing rulesets more reliable #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Aug 10, 2023

If a pattern database is failing, it is not installed, but on subsequent run of Puppet the pattern database is not tested again and the configuration converge to a state where the expected pattern database is not installed.

Rework the pattern database testing and installation so that a failing pattern database fail on each subsequent run of Puppet, so that errors can be spotted more easily.

Fixes #42

@smortex smortex force-pushed the more-reliable-test branch 3 times, most recently from 232113c to a4f7d28 Compare August 10, 2023 23:47
@smortex smortex changed the title Make testing and installing more reliable Make testing and installing rulesets more reliable Aug 10, 2023
@smortex smortex force-pushed the more-reliable-test branch 4 times, most recently from f64ea9c to 2bed001 Compare August 11, 2023 00:23
@smortex smortex marked this pull request as ready for review August 11, 2023 00:32
@smortex smortex requested a review from faxm0dem August 11, 2023 00:44
Copy link
Member

@faxm0dem faxm0dem left a comment

Choose a reason for hiding this comment

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

I have to test this but it looks good, thanks !
I tested it and it works indeed using our setup.
Then it got me thinking : wouldn't it be great if /etc/syslog-ng/patterndb/ was also up-to-date, with patterns that actually validated ? I think it's overkill to pdb test all the files individually and would slow things down. But we could keep the old valid /etc/syslog-ng/patterndb/ files if the pdb test <merged file> fails, what do you think ?

manifests/init.pp Outdated Show resolved Hide resolved
@smortex smortex force-pushed the more-reliable-test branch from 2bed001 to ddf1468 Compare August 31, 2023 17:43
@smortex smortex requested a review from a team as a code owner August 31, 2023 17:43
@smortex smortex mentioned this pull request Jan 23, 2025
@smortex smortex force-pushed the more-reliable-test branch 4 times, most recently from 50a00ad to 0f1278b Compare January 23, 2025 19:49
If a pattern database test is failing, it is not installed, but on
subsequent run of Puppet the non-working pattern database is considered
unchanged by puppet so not tested again and the configuration converge
to a state where the updated pattern database is not installed.

Rework the pattern database testing and installation so that a failling
pattern database fail on each subsequent run of Puppet, so that errors
can be spotted more easily.

Fixes #42
@smortex smortex force-pushed the more-reliable-test branch from 0f1278b to 18d408e Compare January 23, 2025 19:50
@smortex smortex requested a review from faxm0dem January 23, 2025 20:04
@smortex
Copy link
Collaborator Author

smortex commented Jan 28, 2025

Then it got me thinking : wouldn't it be great if /etc/syslog-ng/patterndb/ was also up-to-date, with patterns that actually validated ? I think it's overkill to pdb test all the files individually and would slow things down. But we could keep the old valid /etc/syslog-ng/patterndb/ files if the pdb test <merged file> fails, what do you think ?

I have to admit that these files in /etc/syslog-ng/patterndb/ confused me when I was starting using the module. Maybe having the fragments go to /var/cache/... and the merged files to /var/lib/... would have helped me not trying to use the former when I wanted the latter. Now, I know how it works, so I don't really care 🤷

Copy link
Member

@faxm0dem faxm0dem left a comment

Choose a reason for hiding this comment

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

I'm sorry I won't have time to test this.
I trust you if it's been working fine by you!

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

Successfully merging this pull request may close these issues.

Configuration is deceptive on pdbtool(1) error
2 participants