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

Inconsistent handling of numerical base specifier in startup options

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.2
    • Affects Version/s: 2.6.1, 2.7.1
    • Component/s: Usability
    • Labels:
    • Minor Change
    • ALL
    • Hide
      $ ./mongod --port 027017
      2014-05-30T17:05:38.232-0400 [initandlisten] MongoDB starting : pid=12624 port=27017 dbpath=/data/db 64-bit host=sv.local
      2014-05-30T17:05:38.233-0400 [initandlisten] _DEBUG build (which is slower)
      2014-05-30T17:05:38.233-0400 [initandlisten] db version v2.6.2-pre-
      2014-05-30T17:05:38.233-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609
      2014-05-30T17:05:38.233-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      2014-05-30T17:05:38.233-0400 [initandlisten] allocator: tcmalloc
      2014-05-30T17:05:38.233-0400 [initandlisten] options: { net: { port: 27017 } }
      
      ...
      
      $ cat config.ini
      port=027017
      $ ./mongod -f config.ini
      2014-05-30T17:05:49.180-0400 [initandlisten] MongoDB starting : pid=12642 port=27017 dbpath=/data/db 64-bit host=sv.local
      2014-05-30T17:05:49.181-0400 [initandlisten] _DEBUG build (which is slower)
      2014-05-30T17:05:49.181-0400 [initandlisten] db version v2.6.2-pre-
      2014-05-30T17:05:49.181-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609
      2014-05-30T17:05:49.181-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      2014-05-30T17:05:49.181-0400 [initandlisten] allocator: tcmalloc
      2014-05-30T17:05:49.181-0400 [initandlisten] options: { config: "config.ini", net: { port: 27017 } }
      
      ...
      
      $ cat config.yaml
      net:
          port:
              027017
      $ ./mongod -f config.yaml
      2014-05-30T17:06:09.153-0400 [initandlisten] MongoDB starting : pid=12673 port=11791 dbpath=/data/db 64-bit host=sv.local
      2014-05-30T17:06:09.154-0400 [initandlisten] _DEBUG build (which is slower)
      2014-05-30T17:06:09.154-0400 [initandlisten] db version v2.6.2-pre-
      2014-05-30T17:06:09.154-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609
      2014-05-30T17:06:09.154-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      2014-05-30T17:06:09.154-0400 [initandlisten] allocator: tcmalloc
      2014-05-30T17:06:09.154-0400 [initandlisten] options: { config: "config.yaml", net: { port: 11791 } }
      
      ...
      
      Show
      $ ./mongod --port 027017 2014-05-30T17:05:38.232-0400 [initandlisten] MongoDB starting : pid=12624 port=27017 dbpath=/data/db 64-bit host=sv.local 2014-05-30T17:05:38.233-0400 [initandlisten] _DEBUG build (which is slower) 2014-05-30T17:05:38.233-0400 [initandlisten] db version v2.6.2-pre- 2014-05-30T17:05:38.233-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609 2014-05-30T17:05:38.233-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 2014-05-30T17:05:38.233-0400 [initandlisten] allocator: tcmalloc 2014-05-30T17:05:38.233-0400 [initandlisten] options: { net: { port: 27017 } } ... $ cat config.ini port=027017 $ ./mongod -f config.ini 2014-05-30T17:05:49.180-0400 [initandlisten] MongoDB starting : pid=12642 port=27017 dbpath=/data/db 64-bit host=sv.local 2014-05-30T17:05:49.181-0400 [initandlisten] _DEBUG build (which is slower) 2014-05-30T17:05:49.181-0400 [initandlisten] db version v2.6.2-pre- 2014-05-30T17:05:49.181-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609 2014-05-30T17:05:49.181-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 2014-05-30T17:05:49.181-0400 [initandlisten] allocator: tcmalloc 2014-05-30T17:05:49.181-0400 [initandlisten] options: { config: "config.ini" , net: { port: 27017 } } ... $ cat config.yaml net: port: 027017 $ ./mongod -f config.yaml 2014-05-30T17:06:09.153-0400 [initandlisten] MongoDB starting : pid=12673 port=11791 dbpath=/data/db 64-bit host=sv.local 2014-05-30T17:06:09.154-0400 [initandlisten] _DEBUG build (which is slower) 2014-05-30T17:06:09.154-0400 [initandlisten] db version v2.6.2-pre- 2014-05-30T17:06:09.154-0400 [initandlisten] git version: ad9df9f23b3ff4c831ff642817bd2befb8bf4609 2014-05-30T17:06:09.154-0400 [initandlisten] build info: Darwin sv.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 2014-05-30T17:06:09.154-0400 [initandlisten] allocator: tcmalloc 2014-05-30T17:06:09.154-0400 [initandlisten] options: { config: "config.yaml" , net: { port: 11791 } } ...
    • Server 2.7.2

      In a YAML config, a leading "0" causes the number to be interpreted as an octal number, but for the INI config and the command line this leading zero is just ignored.

            Assignee:
            sverch Shaun Verch
            Reporter:
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: