Bug 702764

Summary: [TRIVIAL] mongodb service fails to start due to missing database directory
Product: [Fedora] Fedora EPEL Reporter: Chris Snook <chris.snook>
Component: mongodbAssignee: Orphan Owner <extras-orphan>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el5CC: databases-maint, extras-orphan, fschwarz, matthias, nathaniel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 09:40:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Snook 2011-05-06 21:34:38 UTC
Description of problem:
The mongodb-server package uses /var/lib/mongodb to store database files by default, but it does not actually create the directory, causing the service to crash on startup, while reporting success to the initscript.

Version-Release number of selected component (if applicable):
mongodb-server-1.6.4-1.el5

How reproducible:
100%

Steps to Reproduce:
1. Install mongodb-server on an el5 system that does not have a /var/lib/mongodb directory.
2. service mongod start

Actual results:
Initscript reports [  OK  ] but mongodb is not actually running.  The following appears in /var/log/mongodb/mongodb.log:

Fri May  6 21:06:23 exception in initAndListen std::exception: dbpath (/var/lib/mongodb) does not exist, terminating

Expected results:
/var/lib/mongodb is created at install time and chowned to the mongodb user, and mongodb starts properly.  Ideally the initscript should report failure instead of okay, but the asynchronous nature of the daemon startup may make that impossible.

Additional info:
Works fine on F14.

Comment 1 Matthias Saou 2014-02-04 09:40:20 UTC
Closing, as EPEL 5 currently has mongodb 2.2.0 which does install the required empty directory.