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 #12949] contents of templates.conf not managed, leading to re-defined objects #236

Closed
icinga-migration opened this issue Oct 20, 2016 · 4 comments
Assignees
Labels

Comments

@icinga-migration
Copy link

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

Created by pavo on 2016-10-20 15:59:22 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-10-21 16:03:35 +00:00 (in Redmine)


Hi,

I'm pretty new to Icinga2 and the cookbook, so I might be missing something.

The issue I'm observing is that when using included server recipe example, duplicate definition is created causing icinga2 to fail to start. The error I'm getting is
critical/config: Error: Object 'mail-host-notification' of type 'Notification' re-defined: in /etc/icinga2/objects.d/notification_template.conf: 10:1-10:46; previous definition: in /etc/icinga2/conf.d/templates.conf: 46:1-46:46

While /etc/icinga2/objects.d/notification_template.conf is managed by chef, contents of /etc/icinga2/conf.d/templates.conf are left as is, as provided by the package during installation.

Steps to reproduce:

  • have a clean Ubuntu box
  • put these 2 recipes in the node's run_list: recipe[icinga2::server], recipe[icinga2_server] (the latter is taken from the included example)
  • run chef-client

Thanks

@icinga-migration
Copy link
Author

Updated by pavo on 2016-10-21 16:03:35 +00:00

After taking longer look, it seems to me that the idea of this cookbook may be to store all configs in objects.d, not using conf.d at all.
Having node['icinga2']['disable_conf_d'] set to false prevents Icinga to include configs from conf.d, and though will get rid of the issue.
Perhaps worth setting as default in cookbook attributes file? Or maybe including a role example? I've done that with role in my case.

@vkhatri vkhatri self-assigned this Jan 17, 2017
@vkhatri
Copy link
Member

vkhatri commented Jan 17, 2017

Will update the documentation.

@vkhatri
Copy link
Member

vkhatri commented Jan 27, 2017

I think you meant to say setting node['icinga2']['disable_conf_d'] to true.
It is fair to set it true as default resources are also created by cookbook.

Please feel free to submit a PR.

vkhatri added a commit to vkhatri/chef-icinga2-1 that referenced this issue Jan 28, 2017
@vkhatri
Copy link
Member

vkhatri commented Jan 28, 2017

Cookbook updated.

@vkhatri vkhatri closed this as completed Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants