[SERVER-9275] rpm/init.d-mongod uses dbpath for pidfile location Created: 08/Apr/13  Updated: 11/Jul/16  Resolved: 11/Sep/13

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.4.1
Fix Version/s: 2.5.3

Type: Bug Priority: Major - P3
Reporter: David Hows Assignee: Ernie Hershey
Resolution: Done Votes: 1
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
Backwards Compatibility: Fully Compatible
Operating System: Linux
Participants:

 Description   

Currently the init script in the RPM package uses the following for its path to the PIDFILE.

PIDFILE=`awk -F= '/^dbpath\s=\s/{print $2}' "$CONFIGFILE"`

This means that the PIDFILE variable would pick up the dbpath variable rather than pidfilepath. This won't prevent the start/stop of the server from occurring, nor the creation of the PIDFILE by the MongoD process but does mean that init would not use the location of PIDFILE when stopping the process.

In addition to this both the variables dont allow for the optional spaces between the equals sign and the key/value.

Pull request for this was made by Alexis Midon: https://github.com/mongodb/mongo/pull/410



 Comments   
Comment by i5513 [ 29/Jan/14 ]

Please add this fix to yum repo version

This issue is present at : mongo-10gen-server-2.4.9-mongodb_1.x86_64

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

Regards,

Comment by Ernie Hershey [ 09/Sep/13 ]

I added a comment to the pull request. I would love to get this fix in!

Comment by Ernie Hershey [ 29/Apr/13 ]

I'm going to do some testing of this change. It looks straightforward.

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