Loading...
Loading...
2.6 Configuration Options cite compatibility with 2.4 options including the verbose family of options. Docs refer to v = true in the configuration file, however this doesn't seem to work in 2.6 or 2.4. Steps to reproduce included. Works fine as command-line argument. Documentation states "[mongod’s command line arguments or using a configuration file] are functionally equivalent". Previously: SERVER-11471.
mark.benvenuto commented on Tue, 22 Mar 2016 19:24:16 +0000: The INI files only support the long form for option names. For instance, "verbose" instead of "v. As explained by Shaun the reason why "vv" works is an artifact of how we registered the multiple "v" options with the option parser. While it is possible to change this behavior, the INI files should be more verbose, and so there is not need to support short options. See https://github.com/boostorg/program_options/blob/develop/src/parsers.cpp#L116 sverch commented on Mon, 23 Jun 2014 16:27:10 +0000: I believe this is caused by a combination of the way we register our verbose options, and an idiosyncrasy of boost program options. boost program options allows a "short name" alias for options. The "-v" option is the "short name" for "--verbose": https://github.com/mongodb/mongo/blob/r2.7.2/src/mongo/db/server_options_helpers.cpp#L151 However, the other "vv", "vvv", etc. options are options on their own, rather than short names for another option. See https://github.com/mongodb/mongo/blob/r2.7.2/src/mongo/db/server_options_helpers.cpp#L258. We used boost for the old INI config and the command line, and we still do for 2.6. My suspicion is that "short names" are not supported in INI config files in boost, so the "v" option is not recognized there, but the others are since they are their own options. I did a small test by trying "help=true" which worked, and "h=true", which did not work ("h" is the short name for "help"). I do believe this is a bug, although a minor one because the "workaround" is to just use "verbose" instead of "v", and because the INI config is deprecated.
$ cat mongod-v.conf v = true $ cat mongod-vv.conf vv = true $ mongodb-osx-x86_64-2.6.3/bin/mongod --config mongod-v.conf Error parsing INI config file: unknown option v [...] # works $ mongodb-osx-x86_64-2.6.3/bin/mongod --config mongod-vv.conf 2014-06-20T23:21:49.061-0400 [DataFileSync] BackgroundJob starting: DataFileSync [...] $ mongodb-osx-x86_64-2.4.0/bin/mongod --config mongod-v.conf error command line: unknown option v use --help for help $ mongodb-osx-x86_64-2.6.3/bin/mongod -v 2014-06-20T23:29:07.213-0400 [DataFileSync] BackgroundJob starting: DataFileSync [...]
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.