Red Hat Bugzilla – Bug 1022476
mongodb init script does not respect sysconfig options
Last modified: 2014-08-29 15:42:10 EDT
Created attachment 815338 [details]
Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set "OPTIONS='--setParameter enableLocalhostAuthBypass=0'" in /etc/sysconfig/mongod
2. service restart mongod
The parameter is not picked up
The parameter is picked up
The code which is supposed to pick up the settings is sourcing the sysconfig *after* trying to read the variable. Also, the variable name in the sample sysconfig is not matching what the init script expects.
Created attachment 815339 [details]
A second patch to clean up the init script. The sample config may otherwise confuse people that it is possible to override the "-f" setting.
Note that the current 2.4.6-3.el6 seems to be broken after a fresh install :
[root@rs01 ~]# service mongod start
Starting mongod: [ OK ]
[root@rs01 ~]# service mongod status
mongod dead but subsys locked
[root@rs01 ~]# tail /var/log/mongodb/mongodb.log
error command line: multiple_occurrences
use --help for help
The "multiple_occurrences" message is about command-line options being repeated. The problem here is that "--quiet" is present hardcoded in the init script *and* inside the default sysconfig file. Removing it from the sysconfig file fixes the problem.
Fixed in http://pkgs.fedoraproject.org/cgit/mongodb.git/commit/?h=el6&id=bbc6130339b5eb57a9a078ff65e47ec502d6ad67 .
mongodb-2.4.6-5.el6 has been submitted as an update for Fedora EPEL 6.
mongodb-2.4.6-5.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.