[ZBX-4056] Not adding triggers dependencies Created: 2011 Aug 17  Updated: 2017 May 30  Resolved: 2011 Nov 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 1.9.6 (beta)
Fix Version/s: 1.9.8 (beta)

Type: Incident report Priority: Blocker
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: dependencies, triggers
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

lastest trunk revision


Attachments: PNG File bug_1.png    

 Description   

after linking template with triggers dependencies to host. Update host or create host.



 Comments   
Comment by Ivan Pozdeev [ 2011 Oct 24 ]

WFM in 1.8.5 .

Comment by richlv [ 2011 Oct 25 ]

as this was reported against trunk (or 1.9.6), presumably it's a regression since 1.8.5

Comment by Alexei Vladishev [ 2011 Oct 27 ]

It seems to work fine with pre-1.8.9. In trunk it can be reproduced by creating an empty host then linking it to a template having dependencies. Dependencies for the host will not be created.

Comment by Alexey Fukalov [ 2011 Oct 31 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4056

Comment by Aleksandrs Saveljevs [ 2011 Oct 31 ]

(1) Add a bunch of dependencies to a trigger in a template. Observe bug_1.png. The first problem is undefined index, the second problem is that

{HOST.NAME}

macro in dependency list is expanded.

<Vedmak> RESOLVED

<asaveljevs> Attempting to add a dependency from a trigger in a template to itself loads the Web server and the database, and never completes.

<Vedmak> RESOLVED

<asaveljevs> If dependencies of trigger in a template have not changed, they should not be recreated in downstream templates and hosts.

<Vedmak> RESOLVED

<asaveljevs> Not happy about function array_equal(). Consider what happens if $strict is true and arrays are equal according to "==", but not "===".

<Vedmak> RESOLVED

<asaveljevs> CLOSED

Comment by Aleksandrs Saveljevs [ 2011 Nov 04 ]

(2) It is now possible to create a cyclic trigger dependency.

Steps to reproduce:

  • Create template T and link it to host H.
  • Create triggers A and B on T.
  • On H, create a dependency from B to A.
  • On T, create a dependency from A to B.

On H there is now a cyclic dependency between these two triggers.

<Vedmak> RESOLVED

<igor> Now it is not possible to create cyclic trigger dependencies in dev branch ZBX-4056. TESTED

<asaveljevs> Please review r22989. Can be merged after that is done.

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2011 Nov 07 ]

svn://svn.zabbix.com/trunk 23007

Comment by Oleksii Zagorskyi [ 2011 Nov 07 ]

This bud is not reproducible in the trunk anymore, but I can reproduce it for the 1.8 branch (rev 22996)
What is better to do?

Comment by Oleksii Zagorskyi [ 2011 Nov 08 ]

Issue for 1.8 branch created. ZBX-4333

Comment by Alexey Pustovalov [ 2011 Nov 09 ]

i have error, when host link template with trigger depends:

Trigger "Осталось мало свободной оперативной памяти:

{eoip-back.is74.ru:vm.memory.size[free].avg(#3)}

<5M" created.
Error in query [SELECT t.triggerid FROM triggers t,functions f,items i WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND t.templateid=12241 AND i.hostid=] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573] Error in query [SELECT t.triggerid FROM triggers t,functions f,items i WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND t.templateid=12241 AND i.hostid=] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573] Error in query [SELECT t.triggerid FROM triggers t,functions f,items i WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND t.templateid=12227 AND i.hostid=] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573] Error in query [SELECT t.triggerid FROM triggers t,functions f,items i WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND t.templateid=14033 AND i.hostid=] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]

Comment by Alexey Fukalov [ 2011 Nov 10 ]

Cannot reproduce with default templates with dependencies.
Could you please attach xml with template?

Comment by Alexey Pustovalov [ 2011 Nov 10 ]

i thinking issue need close.
In database was many incorrect functions (without records about triggers in triggers table). Bug after migrating version from 1.8 to 2.0.

Generated at Thu Mar 28 20:58:48 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.