Bug 1022476 - mongodb init script does not respect sysconfig options
Summary: mongodb init script does not respect sysconfig options
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mongodb
Version: el6
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Nathaniel McCallum
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-10-23 11:22 UTC by Georgi Georgiev
Modified: 2014-08-29 19:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-02-10 09:28:53 UTC
Type: Bug

Attachments (Terms of Use)
0001-init-script-should-pick-up-the-options-from-the-sysc.patch (1.12 KB, patch)
2013-10-23 11:22 UTC, Georgi Georgiev
no flags Details | Diff
0002-f-etc-mongodb.conf-is-set-in-the-sysconf-file.patch (772 bytes, patch)
2013-10-23 11:24 UTC, Georgi Georgiev
no flags Details | Diff

Description Georgi Georgiev 2013-10-23 11:22:47 UTC
Created attachment 815338 [details]

Description of problem:

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. set "OPTIONS='--setParameter enableLocalhostAuthBypass=0'" in /etc/sysconfig/mongod
2. service restart mongod

Actual results:
The parameter is not picked up

Expected results:
The parameter is picked up

Additional info:
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.

Comment 1 Georgi Georgiev 2013-10-23 11:24:02 UTC
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.

Comment 2 Matthias Saou 2014-02-04 09:30:08 UTC
Note that the current 2.4.6-3.el6 seems to be broken after a fresh install :

  mongodb-server.x86_64 0:2.4.6-3.el6                                           

[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.

Comment 4 Fedora Update System 2014-08-12 11:14:49 UTC
mongodb-2.4.6-5.el6 has been submitted as an update for Fedora EPEL 6.

Comment 5 Fedora Update System 2014-08-29 19:42:10 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.