Navigation Menu

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

[dev.icinga.com #9535] Config parser ignores "ignore" in template definition #3114

Closed
icinga-migration opened this issue Jul 1, 2015 · 5 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/9535

Created by tredel on 2015-07-01 08:36:00 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-07-02 15:55:04 +00:00)
Target Version: 2.3.7
Last Update: 2015-07-13 09:01:47 +00:00 (in Redmine)

Icinga Version: 2.3.5
Backport?: Already backported
Include in Changelog: 1

Operating system version: 2.6.32-431.el6.x86_64
Distribution: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Package: icinga2-2.3.5-1.el6.x86_64

if i try to do "assign" within a template definition the config parser throws this error message: "object rule 'assign' cannot be used for type 'Host'

template Host "test" {
        import "generic"
        assign where match("*", host.name)
}

But if i try to do "ignore" there's no error. Seems like the config parser ignores the "ignore where" line overall. The line has no effect.

template Host "test" {
        import "generic"
        ignore where match("*", host.name)
}

Changesets

2015-07-02 15:53:34 +00:00 by (unknown) ed3882b

Fix config parser ignoring forbidden "ignore" in template definition

fixes #9535

2015-07-13 09:01:19 +00:00 by (unknown) b423609

Fix config parser ignoring forbidden "ignore" in template definition

fixes #9535

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-07-02 15:51:42 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.4.0

There's only code implemented for checking if 'assign' was seen, as 'ignore' without any 'assign' expression does not make sense. Therefore the parser silently ignores standalone 'ignore' expressions in objects/templates and does not check against a valid object rule expression.

I've implemented and tested a fix, please test the git mater/snapshot packages.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-07-02 15:52:53 +00:00

  • Estimated Hours set to 2

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-07-02 15:55:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset ed3882b.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-07-13 09:01:47 +00:00

  • Target Version changed from 2.4.0 to 2.3.7
  • Backport? changed from TBD to Yes

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-07-16 11:52:31 +00:00

  • Relates set to 9554

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.7 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant