Skip to content
This repository has been archived by the owner. It is now read-only.

[dev.icinga.com #2701] whitespaces are not stripped using multiple templates ("use abc, def, ghi") #1014

Closed
icinga-migration opened this issue Jun 21, 2012 · 6 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Jun 21, 2012

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

Created by uebelhacker on 2012-06-21 14:00:22 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-08-22 18:16:40 +00:00)
Target Version: 1.8
Last Update: 2012-08-22 18:16:40 +00:00 (in Redmine)

Icinga Version: 1.7.1
OS Version: Debian

using multiple templates in service or host definitions is only possible if no white space is used between the template names:

use template1,template2

if there is a space like

use template1, template2

it results in an error. That differs from other configuration options like contactgroups or contacts where even white spaced user names are possible (`contacts Sven Uebelacker, Uebelhacker`).

The error message isin this case:

Error: Template ' template2' specified in service definition could not be not found

that is, the separation of template names is based on comma only.

Please, implement a white space wrap around parsed template names like it is done with contacts etc.

Attachments

Changesets

2012-07-20 18:07:06 +00:00 by mfriedrich 2a88647

core: fix whitespaces are not stripped using multiple templates ("use abc, def, ghi") #2701

actually, this happens on resolving the templates,
on a strsep call withing the loop. we could do it
later on the check for an existing template, but
we'll stay safe doing it directly after we cut
the string

refs #2701

2012-08-19 17:35:34 +00:00 by mfriedrich aa2fa5d

core: fix whitespaces are not stripped using multiple templates ("use abc, def, ghi") #2701

actually, this happens on resolving the templates,
on a strsep call withing the loop. we could do it
later on the check for an existing template, but
we'll stay safe doing it directly after we cut
the string

refs #2701

Conflicts:
	Changelog
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2012

Updated by mfriedrich on 2012-07-20 17:51:05 +00:00

  • File added 2701.cfg

reproducable.

Error: Template ' footpl2' specified in host definition could not be not found (config file '/etc/icinga/own/2701.cfg', starting on line 74)
   Error processing object config files!
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2012

Updated by mfriedrich on 2012-07-20 18:05:08 +00:00

  • Subject changed from white space error with usage of multiple templates (use …,…) to _whitespaces are not stripped using multiple templates ("use abc, def, ghi") _
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 1.8
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2012

Updated by mfriedrich on 2012-07-20 18:10:40 +00:00

  • File added 0001-core-fix-whitespaces-are-not-stripped-using-multiple.patch

patch on git works, i've attached one that applies on top of r1.7 (meaning to say patchable 1.7.1)

could you try that one?, if git does not fit for you?

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2012

Updated by mfriedrich on 2012-07-20 18:11:48 +00:00

  • Status changed from Assigned to Feedback
  • Done % changed from 0 to 100
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2012

Updated by mfriedrich on 2012-08-11 19:04:53 +00:00

  • Status changed from Feedback to 7
  • Icinga Version set to 1
  • OS Version set to Debian
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 22, 2012

Updated by mfriedrich on 2012-08-22 18:16:40 +00:00

  • Status changed from 7 to Resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.