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

    • 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.

        1. image-2018-09-20-11-53-38-060.png
          25 kB
          Aigars Kadikis
        2. image-2018-09-20-11-53-54-005.png
          15 kB
          Aigars Kadikis
        3. image-2018-09-25-10-19-18-703.png
          25 kB
          Aigars Kadikis
        4. image-2018-09-25-10-21-03-196.png
          14 kB
          Aigars Kadikis
        5. image-2018-09-25-10-21-11-353.png
          14 kB
          Aigars Kadikis
        6. ovmm_discovery_test.sh
          1 kB
          Robin Roevens
        7. ovmm.discovery.tar.xz
          0.9 kB
          Robin Roevens
        8. test-Template-VM-Oracle-VM.xml
          147 kB
          Aigars Kadikis
        9. zabbix_server.logparts
          60 kB
          Robin Roevens
        10. zbx_export_templates_OVM_Manager.xml
          10 kB
          Robin Roevens
        11. zbx_export_templates_OVM_Server_OVM_Shared_Repositories.xml
          137 kB
          Robin Roevens

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

              Created:
              Updated:
              Resolved: