[ZBX-6333] server doesn't take into account current nodeid when searches a global regexp by its name Created: 2013 Feb 28 Updated: 2017 May 30 Resolved: 2013 Mar 12 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.5, 2.1.0 |
Fix Version/s: | 2.0.6rc1, 2.1.0 |
Type: | Incident report | Priority: | Critical |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | dm, globalregexps, lld | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
This is real case ! Part of debug log of vanilla 2.0.5: ' f_regexp:'@File systems for discovery' I did a patch: Index: src/libs/zbxdbhigh/lld.c =================================================================== --- src/libs/zbxdbhigh/lld.c (revision 33709) +++ src/libs/zbxdbhigh/lld.c (working copy) @@ -2373,8 +2373,8 @@ result = DBselect("select e.expression,e.expression_type,e.exp_delimiter,e.case_sensitive" " from regexps r,expressions e" " where r.regexpid=e.regexpid" - " and r.name='%s'", - f_regexp_esc); + " and r.name='%s'" DB_NODE, + f_regexp_esc, DBnode_local("r.regexpid")); zbx_free(f_regexp_esc); It helped to get this line (as it should be, IMO): In production environment I have this:
-----------------
----------------- As you see there two regexps with the same name - "discovery filtering on snmp devices", but they use different expressions. And all my LLD discovery rule with the regexp name "discovery filtering on snmp devices" on master nodeid=1 do NOT work correctly - they do NOT discover experted resources. Note - in the code I saw many places where no check for nodeid when selecting a global regexp. |
Comments |
Comment by Andris Zeila [ 2013 Mar 07 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-6333 I updated few other places too where global regexp was being searched. |
Comment by Oleksii Zagorskyi [ 2013 Mar 08 ] |
(1) [Frontend] Problem is that not possible to create/update an regexp on master node if it contains already a regexp from a child node with the same name. This is incorrect behavior of course. ERROR: Regular expression "File systems for discovery" already exists. REOPENED to fix frontend side. dimir This was moved to a separate |
Comment by dimir [ 2013 Mar 12 ] |
Server side successfully tested. Overall places where this was fixed:
|
Comment by Andris Zeila [ 2013 Mar 13 ] |
Server side fixed in: |