Bug 1231269

Summary: typo in mongod.service
Product: [Fedora] Fedora Reporter: Francesco Minafra <Francesco.Minafra>
Component: mongodbAssignee: Marek Skalický <mskalick>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: admiller, apcomptec, bretm, jdornak, jik, johan.o.hedin, jpacner, mskalick, nathaniel, strobert, tdawson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.11-1.fc22 mongodb-3.0.6-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-05 18:14:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Francesco Minafra 2015-06-12 14:19:35 UTC
Description of problem:

There is an error in the mongodb systemd service file at line 9:

/usr/lib/systemd/system/mongod.service

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

mongodb-server-2.6.9-1.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. yum install mongodb-server-2.6.9-1.el7.x86_64
2. systemctl start mongod.service
3. systemctl -l status mongod.service

Actual results:

mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; disabled)
   Active: active (running) since Fri 2015-06-12 16:10:45 CEST; 25s ago
  Process: 30845 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=0/SUCCESS)
 Main PID: 30847 (mongod)
   CGroup: /system.slice/mongod.service
           └─30847 /usr/bin/mongod --quiet -f /etc/mongod.conf run

Jun 12 16:10:44 centos7.localdomain systemd[1]: [/usr/lib/systemd/system/mongod.service:9] Not an absolute path, ignoring: ${PIDFILE-/var/run/mongodb/mongod.pid}
Jun 12 16:10:44 centos7.localdomain systemd[1]: Starting High-performance, schema-free document-oriented database...
Jun 12 16:10:44 centos7.localdomain mongod[30845]: about to fork child process, waiting until server is ready for connections.
Jun 12 16:10:44 centos7.localdomain mongod[30845]: forked process: 30847
Jun 12 16:10:45 centos7.localdomain mongod[30845]: child process started successfully, parent exiting
Jun 12 16:10:45 centos7.localdomain systemd[1]: Started High-performance, schema-free document-oriented database.


Expected results:

mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled)
   Active: active (running) since Fri 2015-06-12 16:01:47 CEST; 10min ago
  Process: 17658 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=0/SUCCESS)
 Main PID: 17660 (mongod)
   CGroup: /system.slice/mongod.service
           └─17660 /usr/bin/mongod --quiet -f /etc/mongod.conf run

Jun 12 16:01:47 openstack.cluster mongod[17658]: about to fork child process, waiting until server is ready for connections.
Jun 12 16:01:47 openstack.cluster mongod[17658]: forked process: 17660
Jun 12 16:01:47 openstack.cluster mongod[17658]: child process started successfully, parent exiting
Jun 12 16:01:47 openstack.cluster systemd[1]: Started High-performance, schema-free document-oriented database.


Additional info:

Seems that this bug was introduced with commit: 

http://pkgs.fedoraproject.org/cgit/mongodb.git/commit/?id=8bee78d1d91dbb64c8a02f51fb7d874dc16f5819

which changes line 9 of file: /usr/lib/systemd/system/mongod.service

PIDFile=/var/run/mongodb/mongod.pid

with:

PIDFile=${PIDFILE-/var/run/mongodb/mongod.pid}

Comment 1 Marek Skalický 2015-06-15 16:40:58 UTC
This change was done to allow user to specify "pidfilepath" option in mongod.conf and to have systemd service still functional.

However MongoDB daemon is only one process systemd can detect it, so PIDFile option is not needed.

Fixed in git - http://pkgs.fedoraproject.org/cgit/mongodb.git/commit/?h=epel7&id=69560d6809e38f3fd8ead1717e01da1c6f9167f1

Comment 2 Fedora Update System 2015-06-15 17:14:31 UTC
mongodb-2.6.10-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mongodb-2.6.10-1.el7

Comment 3 Fedora Update System 2015-06-18 18:35:13 UTC
Package mongodb-2.6.10-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mongodb-2.6.10-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6735/mongodb-2.6.10-1.el7
then log in and leave karma (feedback).

Comment 4 Jonathan Kamens 2015-08-15 17:32:53 UTC
This is also a bug in Fedora 22. Will it be fixed there?

Comment 5 Marek Skalický 2015-08-17 08:14:21 UTC
Sorry, I have forgotten to create bodhi update... I will fix it soon.

Comment 6 Fedora Update System 2015-08-17 19:04:21 UTC
mongodb-2.6.10-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Jonathan Kamens 2015-08-17 19:15:16 UTC
Still broken in Fedora 22. Should I create a separate bug for that or change the product of this bug?

Comment 8 Fedora Update System 2015-08-19 11:27:55 UTC
mongodb-2.6.11-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/mongodb-2.6.11-1.fc22

Comment 9 Marek Skalický 2015-08-19 11:47:20 UTC
Now you can add karma for this update. After it gets karma or stay some time in testing, it will be pushed to stable.

Bugs in EPEL should be fixed in Fedora too, so I think it is not necessary to create a new bug... I referred this bug in the update.

Comment 10 Fedora Update System 2015-08-22 02:51:49 UTC
mongodb-2.6.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mongodb'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/mongodb-2.6.11-1.fc22

Comment 11 Fedora Update System 2015-09-24 08:27:19 UTC
mongodb-2.6.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Marek Skalický 2015-09-24 12:20:06 UTC
Still in F23 and rawhide.

Comment 13 Fedora Update System 2015-09-29 08:39:16 UTC
mongodb-3.0.6-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-a5361c583e

Comment 14 Fedora Update System 2015-10-01 23:54:31 UTC
mongodb-3.0.6-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update mongodb'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-a5361c583e

Comment 15 Fedora Update System 2015-10-02 01:50:15 UTC
mongodb-3.0.6-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update mongodb'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-a5361c583e

Comment 16 Fedora Update System 2015-10-05 18:14:24 UTC
mongodb-3.0.6-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Brallan Jesús Aguilar Rivera 2015-11-14 04:50:47 UTC
The problem persist in Fedora 22

Comment 18 Brallan Jesús Aguilar Rivera 2015-11-14 06:40:23 UTC
(In reply to Brallan Jesús Aguilar Rivera from comment #17)
> The problem persist in Fedora 22

I solved it. In my case the problem is related with insufficient space. In /etc/mongod.conf, I added smallfiles = true and then systemctl restart mongod.service.