Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 203 forks source link

Overriden service custom properties are incorrectly deployed #2873

Open raviks789 opened 8 months ago

raviks789 commented 8 months ago

To Reproduce

The value of service_var_a which was overridden in the inherited service service-a of host template child-host-template is lost.

This has been depicted in the diagrams below.

Director Configuration

classDiagram
    generic-host-template --|> child-host-template
    child-host-template --|> host-a
    generic-service-template --|> service-a
    generic-service-template: custom_vars = [service_var_a, servie_var_b]
    generic-host-template: services = [service-a]
    class child-host-template{
              imports generic-host-template
              inherited services = [service-a]
              vars._override_servicevars = [service-a => [service_var_a = 'host-template-value-a']]
          }
        class host-a{
              imports child-host-template
              inherited services = [service-a]
              vars._override_servicevars = [service-a => [service_var_b = 'host-value-b']]
          }
        class service-a{
              imports generic-service-template
              host = generic-host-template
              vars.service_var_a = 'service-value-a'
              vars.service_var_b = 'service-value-b'
          }

Actual deployed service for host-a

classDiagram
    service-a
    service-a: host = host-a
    service-a: vars.service_var_a = 'service-value-a'
    service-a: vars.service_var_b = 'host-value-b'

Expected deployed service for host-a

classDiagram
    service-a
    service-a: host = host-a
    service-a: vars.service_var_a = 'host-template-value-a'
    service-a: vars.service_var_b = 'host-value-b'

refer: ref/IP/51840

moreamazingnick commented 8 months ago

2424