Probably bug with 2.11.3 config sync

systemctl reload icinga2 at the satellite incorrectly creates /var/lib/icinga2/api/zones/director-global/.authoritative everytime. As of this director-global is ignored to by synced:

[2020-04-01 16:53:38 +0200] information/ApiListener: Ignoring config update from endpoint ‘master.example.com’ for zone ‘director-global’ because we have an authoritative version of the zone’s config.

and finally configuration validation fails (due to missing host templates etc.).

Shall I open an issue or can we check here?

Master:

icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.3-1)

Copyright (c) 2012-2020 Icinga GmbH (https://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.

System information:
  Platform: Ubuntu
  Platform version: 18.04.4 LTS (Bionic Beaver)
  Kernel: Linux
  Kernel version: 4.15.0-91-generic
  Architecture: x86_64

Build information:
  Compiler: GNU 8.3.0
  Build host: runner-LTrJQZ9N-project-298-concurrent-0

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  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

Satellite:

icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.3-1)

Copyright (c) 2012-2020 Icinga GmbH (https://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.

System information:
  Platform: Debian GNU/Linux
  Platform version: 10 (buster)
  Kernel: Linux
  Kernel version: 4.19.0-8-amd64
  Architecture: x86_64

Build information:
  Compiler: GNU 8.3.0
  Build host: runner-LTrJQZ9N-project-298-concurrent-0

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  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

Hi,

can you please post the zone file(s) of your masters/satellites.

Regards,
Carsten

Master (anonymized):

### Master ###

object Zone "example.com" {
   endpoints = [ "master.example.com" ]
}

object Endpoint "master.example.com" {
}


### Global Zones ###

object Zone "global-templates" {
   global = true
}

object Zone "director-global" {
   global = true
}

object Zone "windows-commands" {
   global = true
}


### Satellite ###

object Endpoint "satellite.sb.example.com" {
}

object Zone "sb.example.com" {
        endpoints = [ "satellite.sb.example.com" ]
        parent = "example.com"
}

Satellite (anonymized):

/*
 * Generated by Icinga 2 node setup commands
 * on 2020-04-01 10:41:43 +0200
 */

object Endpoint "master.example.com" {
        host = "master.example.com"
        port = "5665"
}

object Zone "example.com" {
        endpoints = [ "master.example.com" ]
}

object Endpoint "satellite.sb.example.com" {
}

object Zone "sb.example.com" {
        endpoints = [ "satellite.sb.example.com" ]
        parent = "example.com"
}

object Zone "global-templates" {
        global = true
}

object Zone "director-global" {
        global = true
}

object Zone "windows-commands" {
        global = true
}

HI,

that looks so far correct for me. I would try to empty all configuration from the satellite with

systemctl stop icinga2
rm -rf /var/lib/icinga2/api/{packages,zones,zones-stage}/*
systemctl start icinga2

And see if the problem is still there. Maybe also check via icinga object list ... if the zoine configuration is loaded correctly or if there is somewhere else some configuration loaded.

Regards,
Carsten

2 Likes

WTF, I’ve deleted zones and zones-stage but not packages. No it works as it should.
Thank you so much, Carsten!

2 Likes