-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Conversation
232113c
to
a4f7d28
Compare
f64ea9c
to
2bed001
Compare
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.
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 ?
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.
why drop the purge ?
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.
We do not have managed file resources in this directory anymore. They used to be created in manifests/parser.pp on line 27. I removed them because when validation fail, we had empty files which can be merged successfully.
I think we can revert the purge / file resources if we add a dependency Exec["patterndb::deploy::${name}"] -> File["patterndb::file::${name}"]
(i.e. manage the file at the very end, instead of using it to trigger validation and deployment).
I'll test this and report my findings.
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 failling pattern database fail on each subsequent run of Puppet, so that errors can be spotted more easily. Fixes #42
2bed001
to
ddf1468
Compare
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