-
Problem report
-
Resolution: Fixed
-
Major
-
3.0.23, 3.4.11, 3.4.14, 4.0.0
-
Sprint 46, Nov 2018
-
1
Steps to reproduce:
- Create a host with a host discovery rule
- Make discovered host(s) automatically being added to a hostgroup based on a macro returned from the discovery (example hostgroup = VM server pool)
- Change the discovered hostgroup (example: move VM into different server pool)
- Manually move the discovered host into the changed hostgroup before the discovery was ran again (hence zabbix did not have the chance to automatically move the host to this other hostgroup) (example: move discovered host into hostgroup = new VM server pool)
- Wait for the host discovery rule to run again, hence zabbix picking up the hostgroup change
Result:
Zabbix tries to insert the host into the new hostgroup, but since the host was already manually moved to that hostgroup, zabbix server reports a
[Z3005] query failed: [1062] Duplicate entry '<hostid>-<groupid>' for key 'hosts_groups_1' [insert into hosts_groups (hostgroupid,hostid,groupid) values (<hostgroupid>,<hostid),<groupid>);
and stops the discovery. Discovery changes are no longer picked up and discovery fails with a cryptic error claiming it cannot add the configured template to host '???' due to missing zabbix agent interface.
Expected:
Zabbix noticing that the host is already in the desired host group and stop trying to add it again. Then continuing the discovery.
- caused by
-
ZBXNEXT-1633 Implement virtual machine monitoring
- Closed
- is duplicated by
-
ZBX-15926 Errors in posgresql log: duplicate key value violates unique constraint "hosts_groups_1"
- Closed