[ZBX-8299] Existence of discovery rule not checked when running discovery via proxy and the rule on server gets deleted while being run on proxy Created: 2014 Jun 04 Updated: 2017 May 30 Resolved: 2015 May 11 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.2.3 |
Fix Version/s: | 2.0.15rc1, 2.2.10rc1, 2.4.6rc1, 2.5.0 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Ingus Vilnis | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | discoveryrule, networkdiscovery, proxy | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Existence of discovery rule not checked when running discovery rule via proxy and if the rule on server gets deleted meanwhile being run on proxy. How to reproduce: In this scenario Zabbix proxy does not check for existence of discovery rule after server restart and continues to send in discovery data to non-existing rule. 18354:20140604:140732.946 [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`dhosts`, CONSTRAINT `c_dhosts_1` FOREIGN KEY (`druleid`) REFERENCES `drules` (`druleid`) ON DELETE CASCADE) [insert into dhosts (dhostid,druleid) values (192,6)] |
Comments |
Comment by Oleksii Zagorskyi [ 2014 Jun 05 ] |
I think it's absolutely real even in production (w/o stopping zabbix server). added: |
Comment by Aleksandrs Saveljevs [ 2015 Apr 20 ] |
Oleksiy is right: if we perform network discovery on the server and we delete a discovery rule while the discovery is running, the same error will occur. |
Comment by Aleksandrs Saveljevs [ 2015 Apr 22 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8299 by verifying that discovery rules and discovery checks exist in the database before performing any database operations. |
Comment by Andris Zeila [ 2015 Apr 29 ] |
Successfully tested |
Comment by Aleksandrs Saveljevs [ 2015 Apr 29 ] |
Fixed in pre-2.0.15 r53412, pre-2.2.10 r53413, pre-2.4.6 r53414, pre-2.5.0 (trunk) r53415. |