Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1706

--pidfilepath description is misleading

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.2, 1.7.0
    • Affects Version/s: 1.6.1
    • Component/s: None
    • None
    • Environment:
      Ubuntu 10.04
    • Linux

      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

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: