[SERVER-12094] Cannot set false setParameter options in config file Created: 13/Dec/13  Updated: 11/Jul/16  Resolved: 17/Dec/13

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.4.8
Fix Version/s: 2.4.9

Type: Bug Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   
Issue Status as of December 30th, 2013

ISSUE SUMMARY
Any line in a 2.4 config file that ended in "=false" was stripped out and ignored. For flag options and boolean options with a default of false this is not a problem, since being set to false and not being present are equivalent. However, for options that default to true and setParameter options that need to be set to false, this results in the options being ignored when set to false in a config file.

USER IMPACT
All normal options in the 2.4 branch default to false, so the only options affected are some setParameter options that can be set to false but do not have a default of false. It is present in versions of MongoDB between v2.4.0 and v2.4.8, inclusive.

SOLUTION
The conditional that skips the lines that end with "=false" in the config file was modified to not skip any line that starts with "setParameter".

WORKAROUNDS
To set these options to false, the --setParameter must be used on the command line rather than in a config file.

PATCHES
Production release v2.4.9 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.



 Comments   
Comment by Githook User [ 17/Dec/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-12094 Do not strip false setParameter options from config file
Branch: v2.4
https://github.com/mongodb/mongo/commit/0e883bd5f3c8556847fb831b5c45b5d128c6de7a

Comment by Shaun Verch [ 16/Dec/13 ]

We skip options that are set to false in this function:

https://github.com/mongodb/mongo/blob/v2.4/src/mongo/db/cmdline.cpp#L140

Generated at Thu Feb 08 03:27:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.