Open slalomsk8er opened 1 year ago
I will have a look if this is caused by our Linuxfabrik fork / command configuration.
Reproducible both with v1.10.2 and master (b55df21c2109f0ee1ca8baf747b52ce05d944df7). I think the problem is that the override variables of the host template and the host itself do not get merged - the host overwrites the ones set on the host template (probably due to the way the arrays are merged). However, this is not what the GUI makes the user believe.
The GUI needs to be consistent with the generated config. When applying an overwrite on the host template and the host itself, both should be in effect - or the GUI needs to show the actual (current) effect.
Only the variables set on the host itself are effectively used.
Either adjust the GUI or the merging logic.
icingacli director host create localhost --imports tpl-host --address localhost
icingacli director config deploy
field1
has a value, which is used in the command. field1
is set on the host template. The same can be seen using icingacli director host show localhost --resolved
.icingacli director service set 'test service' --host localhost --vars.field2 'set on the host itself' --allow-overrides
icingacli director config deploy
icingacli director host show localhost --resolved
. Note that only field2
is being used, even though the GUI shows both fields.icinga2 --version
): r2.13.6-1
Expected Behavior
Override vars get applied like shown.
Current Behavior
all cmd parameters except --device-id and cmd defaults are gone. none of of the "Override vars" form the host template end up in the command line:
'/usr/lib64/nagios/plugins/huawei-dorado-backup-power' '--cache-expire' '15' '--device-id' '12341234234214' '--scope' '0' '--timeout' '3'
Steps to Reproduce (for bugs)
Your Environment