[ZBX-4257] Discovery rules are incorrectly linked when using multiple-level templates Created: 2011 Oct 20  Updated: 2017 May 30  Resolved: 2012 Mar 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.7 (beta)
Fix Version/s: 2.0.0rc2

Type: Incident report Priority: Blocker
Reporter: dimir Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: discovery, lld, templates
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MySQL 5.0, latest trunk


Attachments: PNG File tmpl-discov-error.png     PNG File tmpl-discov-overview.png    
Issue Links:
Duplicate
is duplicated by ZBX-4745 Can't update LLD rule Closed
is duplicated by ZBX-4771 Cannot create discovery rule Closed

 Description   

When editing discovery rule GUI gives error:

"Discovery rule "tmpl1:zzz" already exists, inherited from another template."

for one of the linked template.

So you need 3 linked templates ("tmpl1" -> "tmpl2"; "tmpl2" -> "tmpl3") with discovery rule in "tmpl3". Steps to reproduce:
1. Go to "Configuration" -> "Templates".
2. Click "Create" and create template "tmpl1".
3. Click "Create" and create template "tmpl2".
4. Click "Create" and create template "tmpl3".
5. Click "Discovery (0)" in "tmpl3".
6. Create any rule.
7. Go back to "Configuration" -> "Templates".
8. Click "tmpl1" and link it to "tmpl2".
9. Click "tmpl2" and link it to "tmpl3".
10. Make sure you have it the same was as on attached screenshot "tmpl-discov-overview.png".
11. Click "Discovery (1)" in "tmpl3".
12. Click the name of discovery rule.
13. Click "Save".
14. Observe the error as on attached screenshot "tmpl-discov-error.png".

NB! The bug appears to happen when making steps 8 and 9. Mind that if you do them vise versa (first linkt "tmpl2" to "tmpl3" and after that "tmpl1" to "tmpl2") the bug won't happen. But even in this case any changes in "tmpl3" will not be propagated to "tmpl1".



 Comments   
Comment by richlv [ 2011 Oct 20 ]

basically, lower level discovery rule (item) gets incorrectly linked to the highest level one (not the direct parent). this makes it impossible to update or delete this discovery rule (it can only be removed by deleting the whole template)

Comment by Pavels Jelisejevs (Inactive) [ 2012 Mar 09 ]

The problem Rich described has been fixed in ZBX-4647, but I've managed to overlook a different problem, that had a similar effect.

RESOLVED.

<Vedmak> CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2012 Mar 14 ]

Fixed in the trunk r26065.

CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Mar 15 ]

(1) This caused a regression: a discovery rule can't be created because of "Incorrect arguments passed to function."

<pavels> RESOLVED in /branches/dev/ZBX-4257.

<Vedmak> Please review my changes in rev. 26179, if everything is ok, can be merged.

<pavels> Fixed in trunk r26184. CLOSED.

Generated at Fri Apr 26 08:29:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.