[ZBX-9368] Network discovery tries to link template repeatedly with duplicate error. Created: 2015 Mar 04  Updated: 2017 May 30  Resolved: 2015 Mar 12

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.4.4
Fix Version/s: 2.0.15rc1, 2.2.10rc1, 2.4.5rc1, 2.5.0

Type: Incident report Priority: Blocker
Reporter: Andrei Gushchin (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: networkdiscovery, templatelinking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

Zabbix every discovery iteration tries to add template witch is already linked.

As result we have

16377:20150304:174811.914 [Z3005] query failed: [1062] Duplicate entry '41099-37168' for key 'hosts_templates_1' [insert into hosts_templates (hosttemplateid,hostid,templateid) values (44424,41099,37168)]
 16375:20150304:184818.329 [Z3005] query failed: [1062] Duplicate entry '41099-37168' for key 'hosts_templates_1' [insert into hosts_templates (hosttemplateid,hostid,templateid) values (44424,41099,37168)]
 16375:20150304:194823.705 [Z3005] query failed: [1062] Duplicate entry '41099-37168' for key 'hosts_templates_1' [insert into hosts_templates (hosttemplateid,hostid,templateid) values (44424,41099,37168)]


 Comments   
Comment by Oleksii Zagorskyi [ 2015 Mar 04 ]

Is this regression ?
If yes, starting from which version ?

sasha This bug is introduced in version 2.0.0 in ZBX-4479.

Comment by Alexander Vladishev [ 2015 Mar 09 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9368

Steps to reproduce:
1. create a discovery action with one operation "Link to template t2"
2. create a network discovery rule to discover one or more devices
3. wait for the creation of new hosts
4. add another template t1 to the discovery action operation (the template t1 should be with lower hostid)

Same issue can be with host low-level discovery.

Comment by Alexander Vladishev [ 2015 Mar 12 ]

Fixed in:

  • pre-2.0.15 r52689
  • pre-2.2.10 r52690
  • pre-2.4.5 r52691
  • pre-2.5.0 (trunk) r52692
Generated at Sat Apr 20 12:27:09 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.