[SERVER-1706] --pidfilepath description is misleading Created: 31/Aug/10  Updated: 12/Jul/16  Resolved: 31/Aug/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.6.1
Fix Version/s: 1.6.2, 1.7.0

Type: Bug Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.04


Operating System: Linux
Participants:

 Description   

Problem:
The help text for the --pidfilepath argument is misleading, this is what it says in 1.6.1

--pidfilepath arg directory for pidfile (if not set, no pidfile is
created)

However if you start mongo up as follows, you do not get a pid file but you do not get an error

shell> mongod --pidfile /foo/bar

test@alvin-ubuntu104-desktop:~$ sudo mongod --pidfilepath /data/db
Mon Aug 30 20:09:25 MongoDB starting : pid=30575 port=27017 dbpath=/data/db/ 32-bit
[...]
Mon Aug 30 20:09:25 db version v1.7.0-pre-, pdfile version 4.5
Mon Aug 30 20:09:25 git version: e2c5acbe4b511ca74b9db4ec556e6dc488263b2e
Mon Aug 30 20:09:25 sys info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_37
Mon Aug 30 20:09:25 [initandlisten] waiting for connections on port 27017
Mon Aug 30 20:09:25 [websvr] web admin interface listening on port 28017

This argument needs to be a filename, so the correct syntax is

shell> mongod --pidfilepath /data/db/my.pid

test@alvin-ubuntu104-desktop:~$ ls -l /data/db/my.pid
rw-rr- 1 root root 0 2010-08-30 20:37 /data/db/my.pid

Solution:
a) if --pidfilepath is a directory, emit a warning message but continue to startup
b) change the argument description to say it needs to be a filename and not a directory

Reproduce:

  • start mongo with a valid directory name
    shell> mongod --pidfilepath /foo/bar

Workaround:
Startup with a filename e.g.
shell> mongod --pidfilepath /for/bar/my.pid

Business Case:
User experience



 Comments   
Comment by auto [ 31/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix docs for pidfilepath SERVER-1706
http://github.com/mongodb/mongo/commit/625b4c4378337435e059e3226ffe64421068f6b1

Comment by auto [ 31/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix docs for pidfilepath SERVER-1706
http://github.com/mongodb/mongo/commit/387e0e4fcdb3498fc84f3f5386a15e450ea4c5f1

Generated at Thu Feb 08 02:57:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.