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

repository.d missing after install #403

Closed
jasonsattler opened this issue Nov 17, 2017 · 7 comments
Closed

repository.d missing after install #403

jasonsattler opened this issue Nov 17, 2017 · 7 comments
Assignees
Labels
Milestone

Comments

@jasonsattler
Copy link

jasonsattler commented Nov 17, 2017

repository.d missing after install

In your templates you add the following to the icinga2.conf

/**
 * The repository.d directory contains all configuration objects
 * managed by the 'icinga2 repository' CLI commands.
 */
include_recursive "repository.d"

Issue

The issue is that if that folder doesn't exist the icinga2 daemon will not start. Not sure when they removed that directory from being created by default.

Workaround

  file {'add-repository.d':
    ensure  => directory,
    path    => '/etc/icinga2/repository.d',
    owner   => 'icinga',
    group   => 'icinga',
    mode    => '0750',
    require => Package['icinga2'],
    before  => Service['icinga2'],
  }
@lbetz
Copy link
Contributor

lbetz commented Nov 17, 2017

What kind of version of icinga2 you used?

@jasonsattler
Copy link
Author

Just installed it today

[root@icinga2 icinga2.example.com]# yum list | grep icinga
icinga2.x86_64                          2.8.0-1.el7.icinga             @icinga-stable-release
icinga2-bin.x86_64                      2.8.0-1.el7.icinga             @icinga-stable-release
icinga2-common.x86_64                   2.8.0-1.el7.icinga             @icinga-stable-release
icinga2-ido-pgsql.x86_64                2.8.0-1.el7.icinga             @icinga-stable-release
icinga2-libs.x86_64                     2.8.0-1.el7.icinga             @icinga-stable-release

[root@icinga2 icinga2.example.com]# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.8.0-1)

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-514.26.2.el7.x86_64
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.5
  Build host: unknown

@zznathans
Copy link

zznathans commented Nov 17, 2017

Also noticing this with the latest version. The workaround for creating the folder (either manually or via puppet) works to let things run.

Using defaults from "example2"

@lbetz
Copy link
Contributor

lbetz commented Nov 18, 2017

It's gone with Icinga 2 v2.8. We will it also remove in the future.... for now we'll handle the directory inside this module and use a parameter repositoryd with default to true. In puppet-icinga2 v2.0 we'll change it to false.

@lbetz lbetz self-assigned this Nov 18, 2017
@lbetz lbetz added this to the v1.3.4 milestone Nov 18, 2017
@lbetz lbetz added the bug label Nov 18, 2017
@lbetz
Copy link
Contributor

lbetz commented Nov 18, 2017

I tried to fix it in branch bug/repository.d-missing-after-install-403 but I still testing.

@lbetz
Copy link
Contributor

lbetz commented Nov 18, 2017

@jasonsattler please note use a file resource with icinga config or a directory in this context:

file {'add-repository.d':
ensure => directory,
path => '/etc/icinga2/repository.d',
owner => 'icinga',
group => 'icinga',
mode => '0750',
tag. => 'icinga2::config::file',
}

Have a look at the documentation under 'Custom configuration'.

@lbetz
Copy link
Contributor

lbetz commented Nov 18, 2017

Parameter repositord is added. Set it to false will remove the directory if exists.

@lbetz lbetz closed this as completed in a550988 Nov 18, 2017
n00by pushed a commit to n00by/puppet-icinga2 that referenced this issue Apr 26, 2018
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

3 participants