You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a sync rule with update policy ignore. The corresponding import source provides a server with name test-server.
However, a server called Test-Server already exists in the director. Therefore, the new host test-server should be ignored.
Current Behavior
The following error occurs:
This Sync Rule failed when last checked at 2021-10-27 16:35:40: Exception while syncing Icinga\Module\Director\Objects\IcingaHost test-server: Trying to recreate icinga_host ("test-server")
This is because during the preparation for the import (as seen during "check for changes"), the matching is done with case sensitivity, therefore 'test-server' != 'Test-Server' (see
Expected Behavior
We have a sync rule with update policy
ignore
. The corresponding import source provides a server with nametest-server
.However, a server called
Test-Server
already exists in the director. Therefore, the new hosttest-server
should be ignored.Current Behavior
The following error occurs:
This is because during the preparation for the import (as seen during "check for changes"), the matching is done with case sensitivity, therefore
'test-server' != 'Test-Server'
(seeicingaweb2-module-director/library/Director/Import/Sync.php
Line 689 in 4f95957
So the director tries to create a new host with name
test-server
, however this fails here:icingaweb2-module-director/library/Director/Data/Db/DbObject.php
Line 988 in 4f95957
This checks against the db with a SQL statement, which is case insensitive (assuming
utf8_general_ci
, according to the installation guide).Possible Solution
The check during the preparation phase should be the same as the check during the creation phase.
Steps to Reproduce (for bugs)
In the director:
add a dummy host with hostname
Test-Server
.add import source:
host
fileshipper-test
hosts.json
trigger import run
add sync rule:
object type: host
update policy: ignore
purge: no
properties:
trigger this sync
Your Environment
icinga2 --version
): 2.13.1-1The text was updated successfully, but these errors were encountered: