Bug 1022476 - mongodb init script does not respect sysconfig options
mongodb init script does not respect sysconfig options
Product: Fedora EPEL
Classification: Fedora
Component: mongodb (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Nathaniel McCallum
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-23 07:22 EDT by Georgi Georgiev
Modified: 2014-08-29 15:42 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-10 04:28:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Georgi Georgiev 2013-10-23 07:22:47 EDT
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 07:24:02 EDT
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 04:30:08 EST
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 07:14:49 EDT
mongodb-2.4.6-5.el6 has been submitted as an update for Fedora EPEL 6.
Comment 5 Fedora Update System 2014-08-29 15:42:10 EDT
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.