Skip to content

Loading…

SERVER-9275 Fix the location of the pidfile in the rpm and bump rpm to 2.4.1 #403

Closed
wants to merge 2 commits into from

3 participants

@nubs

The pidfile location pointed at by the default conf is not created by default so the process is currently broken. This bug leads to issues where trying to kill the mongod via service mongod stop will kill all running mongod's on the box, not just the one that was started by the service.

I changed the location to be more in line with other default directories used and made sure that the directory now exists.

The bump to 2.4.1 was to ease the update of the hosted rpms.

https://jira.mongodb.org/browse/SERVER-7708

nubs added some commits
@nubs nubs SERVER-7708 Fix pidfile location for rpm.
The pidfile location wasn't created by the old spec and it didn't
match up with the log location or lib location.
5046ed2
@nubs nubs SERVER-7708 Bump rpm spec to 2.4.1. 0a35a97
@ehershey
mongodb member

Thank you! At first glance these look like good changes. We'll do some further review and testing.

Ernie

@nubs

It's been 2 months - any progress?

@ehershey
mongodb member

Hi Spencer -

Yes we have made some progress. One of the things we need to do is have some better internal testing on package changes, which is still in progress. Another thing that's in progress that will help is to move our spec and control files out of dynamically generated code (the versions we actually use are in buildscripts/packager.py in the mongo repo). Thanks again!

Ernie

@nubs

Ah thanks for the info!

@ehershey ehershey was assigned
@benety

Hi Spencer,

We did some follow up on this pull request and noticed that this is duplicated by #410 which has been merged in commits 5b762d5 and 63e2213.

Thank you for contributing!
Ben

@benety benety closed this
@benety benety changed the title from Fix the location of the pidfile in the rpm and bump rpm to 2.4.1 to SERVER-9275 Fix the location of the pidfile in the rpm and bump rpm to 2.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 26, 2013
  1. @nubs

    SERVER-7708 Fix pidfile location for rpm.

    nubs committed
    The pidfile location wasn't created by the old spec and it didn't
    match up with the log location or lib location.
  2. @nubs

    SERVER-7708 Bump rpm spec to 2.4.1.

    nubs committed
Showing with 9 additions and 3 deletions.
  1. +1 −1 rpm/init.d-mongod
  2. +7 −1 rpm/mongo.spec
  3. +1 −1 rpm/mongod.conf
View
2 rpm/init.d-mongod
@@ -23,7 +23,7 @@ SYSCONFIG="/etc/sysconfig/mongod"
# shuts down the correct running pid, but that's unavailable in 1.8
# for now. This can go away when this script stops supporting 1.8.
DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONFIGFILE"`
-PIDFILE=`awk -F= '/^dbpath\s=\s/{print $2}' "$CONFIGFILE"`
+PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"`
mongod=${MONGOD-/usr/bin/mongod}
MONGO_USER=mongod
View
8 rpm/mongo.spec
@@ -1,7 +1,7 @@
Name: mongo-10gen
Conflicts: mongo, mongo-10gen-unstable
Obsoletes: mongo-stable
-Version: 2.4.0
+Version: 2.4.1
Release: mongodb_1%{?dist}
Summary: mongo client shell and tools
License: AGPL 3.0
@@ -65,6 +65,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
mkdir -p $RPM_BUILD_ROOT/var/log/mongo
+mkdir -p $RPM_BUILD_ROOT/var/run/mongo
touch $RPM_BUILD_ROOT/var/log/mongo/mongod.log
%clean
@@ -140,9 +141,14 @@ fi
#/etc/rc.d/init.d/mongos
%attr(0755,mongod,mongod) %dir /var/lib/mongo
%attr(0755,mongod,mongod) %dir /var/log/mongo
+%attr(0755,mongod,mongod) %dir /var/run/mongo
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongo/mongod.log
%changelog
+* Tue Mar 26 2013 Spencer Rinehart <spencer.rinehart@dominionenterprises.com>
+- Fix pidfile location.
+- Bump to 2.4.1.
+
* Thu Jan 28 2010 Richard M Kreuter <richard@10gen.com>
- Minor fixes.
View
2 rpm/mongod.conf
@@ -13,7 +13,7 @@ fork = true
dbpath=/var/lib/mongo
# location of pidfile
-pidfilepath = /var/run/mongodb/mongod.pid
+pidfilepath=/var/run/mongo/mongod.pid
# Disables write-ahead journaling
# nojournal = true
Something went wrong with that request. Please try again.