Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14635

host discovery fails after manual move to hostgroup

XMLWordPrintable

    • Team A
    • Sprint 46, Nov 2018
    • 1

      Steps to reproduce:

      1. Create a host with a host discovery rule
      2. Make discovered host(s) automatically being added to a hostgroup based on a macro returned from the discovery (example hostgroup = VM server pool)
      3. Change the discovered hostgroup (example: move VM into different server pool)
      4. 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)
      5. 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.

            Kalimulin Alex Kalimulin
            robinr Robin Roevens
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: