[ZBX-3105] processing of garbage in configuration files Created: 2010 Oct 18 Updated: 2017 May 30 Resolved: 2011 May 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Proxy (P), Server (S) |
Affects Version/s: | 1.8.4rc1 |
Fix Version/s: | 1.8.6, 1.9.5 (alpha) |
Type: | Incident report | Priority: | Minor |
Reporter: | Aleksandrs Saveljevs | Assignee: | dimir |
Resolution: | Fixed | Votes: | 5 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
On startup, when processing configuration files, if a line is encountered that is not a comment and not a parameter value (e.g., "asdf"), Zabbix processes stop processing the configuration file and start normally. This is not good. Our processes should complain about a bad line and exit. |
Comments |
Comment by richlv [ 2011 Apr 13 ] |
it should also be figured out what to do about duplicate valid params. complain & exit ? complain & continue ? continuing might be required in scenarios where users use includes to override defaults. in that case it should be logged which value was eventually used (which seems to be the last one encountered) of course, it should not complain about params that may be repeated, for example, UserParameter also, specifying two userparams with the same key should be checked. |
Comment by Alexander Vladishev [ 2011 Apr 21 ] |
(1) Please, see my changes in revision 19172. Small refactoring |
Comment by Alexander Vladishev [ 2011 Apr 21 ] |
(2) Error, while starting Zabbix agent: zabbix_agentd [15777]: unknown parameter [EnableRemoteCommands] in line 62 <sasha> CLOSED |
Comment by richlv [ 2011 Apr 25 ] |
this will help with many, many problems... like http://www.zabbix.com/forum/showthread.php?t=21733 (3) what about repeated valid parameters ? <dimir> Currently it works so that it won't stop on first parameter match to get the value, it will continue till the end of the file and will everytime assign new value. By the way, this leads to a memory leaks in case of string type parameters, as it every time does strdup() the value. <dimir> In order to identify duplicate parameters in configuration I guess we would need to either modify cfg_line structure to add field something like "set" (0/1) or track it in load_config() storing all the read parameters in array or something. <richlv> i guess memleak has been fixed ? warning about repeated parameters has been filed as a new issue ZBXNEXT-770 <dimir> CLOSED. We have decided to silently replace repeated valid parameters. |
Comment by dimir [ 2011 May 02 ] |
Fixed in version 1.8.6rc1, r19285, r19287. |
Comment by dimir [ 2011 May 03 ] |
Merged from upstream, resolved the conflicts with PerfCounter changes done by Rudolfs. Need to test those now. |
Comment by dimir [ 2011 May 06 ] |
Fixed in dev branch |
Comment by dimir [ 2011 May 09 ] |
Fixed in branches/dev/ |
Comment by richlv [ 2011 May 16 ] |
(19) please make sure to document all the decision/changes for both 1.8 & 2.0 <dimir> Please review my changes for each Zabbix process in 1.8: http://www.zabbix.com/documentation/1.8/manual/processes . You can search for '1.8.6' string to get the changes. 2.0 is coming up. <dimir> After some discussions with Rich fixed those for 1.8, please review. As for 2.0 I'm not sure where this information should belong, perhaps http://www.zabbix.com/documentation/2.0/manual/concepts ? <dimir> RESOLVED, please confirm changes in 1.8 . As discussed on IRC with zalex and Rich there is nothing to add to 2.0 at this moment as the changes apply to both 1.8 and 2.0 in the same way. |
Comment by dimir [ 2011 May 25 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-3105-trunk . |
Comment by dimir [ 2011 May 26 ] |
Fixed in trunk r19869, 1.8 r19813 . |
Comment by dimir [ 2011 May 26 ] |
(23) Regression: "Include" parameter is not recognized anymore: $ sbin/zabbix_agentd <dimir> RESOLVED |
Comment by dimir [ 2011 May 26 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-3105 . |
Comment by dimir [ 2011 May 27 ] |
Fixed in trunk 19908 , 1.8 19907 . |
Comment by dimir [ 2011 May 27 ] |
Reopening to fix "Fix versions". |
Comment by richlv [ 2011 Aug 30 ] |
daemons calling user input garbage reported as |