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

empty actions sections do not validate #3

Open
faxm0dem opened this issue Oct 23, 2014 · 3 comments · May be fixed by #43
Open

empty actions sections do not validate #3

faxm0dem opened this issue Oct 23, 2014 · 3 comments · May be fixed by #43

Comments

@faxm0dem
Copy link
Member

No description provided.

@smortex
Copy link
Collaborator

smortex commented Aug 9, 2023

Funny, I just encounter this issue today. Looks like version 6 is more strict:

/etc/syslog-ng/patterndb.d/default/anacron.pdb: error validating pdb file: Non-zero exit code from xmllint while validating PDB file, schema version 6, rc=3, error: /etc/syslog-ng/patterndb.d/default/anacron.pdb:59: element actions: Schemas validity error : Element 'actions': Missing child element(s). Expected is ( action ).

Version 5 was fine.

smortex added a commit that referenced this issue Aug 9, 2023
The latest version of the patterndb schema fail validation if an ACTIONS
tag has no ACTION tag in it.  Ensure we do not produce such a tag when
it is not needed.

Fixes #3
@smortex smortex linked a pull request Aug 9, 2023 that will close this issue
@smortex
Copy link
Collaborator

smortex commented Aug 10, 2023

Uh. It is not trivial to fix. The most reasonable plan I see consists in removing the patterndb::simple::action define type completely and only allow to add actions in rules by passing them at the patterndb::simple::rule level with the actions parameter.

This allows to check if we have or don't have actions for a rule and emit or not emit the <actions> tag respectively. This is what #43 currently does, but as we allow the other way to add actions it is currently broken.

@smortex
Copy link
Collaborator

smortex commented Aug 10, 2023

Looks like version 6 is more strict [...] Version 5 was fine.

🤦 okay, I was testing with the commented version of the test command, with the --validate flag. This command fail regardless of the version used.

Without --validate, the latest version can be used. This explain why I never saw the issue before.

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 a pull request may close this issue.

2 participants