diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2013-08-17 16:11:06 -0400 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2013-09-05 13:49:34 -0400 |
commit | 19013c4049d2dc018128c5bf2e63781fb5499b0e (patch) | |
tree | a06b82a7ddec8f23cc4b464c3d1d8802f9e714c1 /src/mongo/db | |
parent | 3de119ff3e2acd33d54a6190cbaefe38b13366e0 (diff) | |
download | mongo-19013c4049d2dc018128c5bf2e63781fb5499b0e.tar.gz |
SERVER-8510 Remove all uses of boost direct storage and remove custom boost modifications
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/cmdline.cpp | 69 | ||||
-rw-r--r-- | src/mongo/db/db.cpp | 11 |
2 files changed, 65 insertions, 15 deletions
diff --git a/src/mongo/db/cmdline.cpp b/src/mongo/db/cmdline.cpp index 40db88584de..16e89d4c861 100644 --- a/src/mongo/db/cmdline.cpp +++ b/src/mongo/db/cmdline.cpp @@ -85,8 +85,8 @@ namespace { ("config,f", po::value<string>(), "configuration file specifying additional options") ("verbose,v", "be more verbose (include multiple times for more verbosity e.g. -vvvvv)") ("quiet", "quieter output") - ("port", po::value<int>(&cmdLine.port), portInfoBuilder.str().c_str()) - ("bind_ip", po::value<string>(&cmdLine.bind_ip), "comma separated list of ip addresses to listen on - all local ips by default") + ("port", po::value<int>(), portInfoBuilder.str().c_str()) + ("bind_ip", po::value<string>(), "comma separated list of ip addresses to listen on - all local ips by default") ("maxConns",po::value<int>(), maxConnInfoBuilder.str().c_str()) ("logpath", po::value<string>() , "log file to send write to instead of stdout - has to be a file, not directory" ) ("logappend" , "append to logpath instead of over-writing" ) @@ -97,7 +97,7 @@ namespace { ("setParameter", po::value< std::vector<std::string> >()->composing(), "Set a configurable parameter") ("httpinterface", "enable http interface") - ("clusterAuthMode", po::value<std::string>(&cmdLine.clusterAuthMode), + ("clusterAuthMode", po::value<std::string>(), "Authentication mode used for cluster authentication." " Alternatives are (keyfile|sendKeyfile|sendX509|x509)") #ifndef _WIN32 @@ -112,15 +112,16 @@ namespace { #ifdef MONGO_SSL ssl_options.add_options() ("sslOnNormalPorts" , "use ssl on configured ports" ) - ("sslPEMKeyFile" , po::value<string>(&cmdLine.sslPEMKeyFile), "PEM file for ssl" ) - ("sslPEMKeyPassword" , new PasswordValue(&cmdLine.sslPEMKeyPassword) , "PEM file password" ) - ("sslClusterFile", po::value<string>(&cmdLine.sslClusterFile), + ("sslPEMKeyFile" , po::value<string>(), "PEM file for ssl" ) + ("sslPEMKeyPassword" , po::value<string>()->implicit_value(""), + "PEM file password" ) + ("sslClusterFile", po::value<string>(), "Key file for internal SSL authentication" ) - ("sslClusterPassword", new PasswordValue(&cmdLine.sslClusterPassword), + ("sslClusterPassword", po::value<string>()->implicit_value(""), "Internal authentication key file password" ) - ("sslCAFile", po::value<std::string>(&cmdLine.sslCAFile), + ("sslCAFile", po::value<std::string>(), "Certificate Authority file for SSL") - ("sslCRLFile", po::value<std::string>(&cmdLine.sslCRLFile), + ("sslCRLFile", po::value<std::string>(), "Certificate Revocation List file for SSL") ("sslWeakCertificateValidation", "allow client to connect without presenting a certificate") ("sslFIPSMode", "activate FIPS 140-2 mode at startup") @@ -133,9 +134,9 @@ namespace { ("objcheck", "inspect client data for validity on receipt (DEFAULT)") ("noobjcheck", "do NOT inspect client data for validity on receipt") ("traceExceptions", "log stack traces for every exception") - ("enableExperimentalIndexStatsCmd", po::bool_switch(&cmdLine.experimental.indexStatsCmdEnabled), + ("enableExperimentalIndexStatsCmd", po::bool_switch(), "EXPERIMENTAL (UNSUPPORTED). Enable command computing aggregate statistics on indexes.") - ("enableExperimentalStorageDetailsCmd", po::bool_switch(&cmdLine.experimental.storageDetailsCmdEnabled), + ("enableExperimentalStorageDetailsCmd", po::bool_switch(), "EXPERIMENTAL (UNSUPPORTED). Enable command computing aggregate statistics on storage.") ; } @@ -254,8 +255,6 @@ namespace { po::store( po::parse_config_file( ss , all ) , params ); f.close(); } - - po::notify(params); } catch (po::error &e) { cout << "error command line: " << e.what() << endl; @@ -326,6 +325,25 @@ namespace { } } + if (params.count("enableExperimentalIndexStatsCmd")) { + cmdLine.experimental.indexStatsCmdEnabled = true; + } + if (params.count("enableExperimentalStorageDetailsCmd")) { + cmdLine.experimental.storageDetailsCmdEnabled = true; + } + + if (params.count("port")) { + cmdLine.port = params["port"].as<int>(); + } + + if (params.count("bind_ip")) { + cmdLine.bind_ip = params["bind_ip"].as<std::string>(); + } + + if (params.count("clusterAuthMode")) { + cmdLine.clusterAuthMode = params["clusterAuthMode"].as<std::string>(); + } + if (params.count("quiet")) { cmdLine.quiet = true; } @@ -458,6 +476,31 @@ namespace { } #ifdef MONGO_SSL + + if (params.count("sslPEMKeyFile")) { + cmdLine.sslPEMKeyFile = params["sslPEMKeyFile"].as<string>(); + } + + if (params.count("sslPEMKeyPassword")) { + cmdLine.sslPEMKeyPassword = params["sslPEMKeyPassword"].as<string>(); + } + + if (params.count("sslClusterFile")) { + cmdLine.sslClusterFile = params["sslClusterFile"].as<string>(); + } + + if (params.count("sslClusterPassword")) { + cmdLine.sslClusterPassword = params["sslClusterPassword"].as<string>(); + } + + if (params.count("sslCAFile")) { + cmdLine.sslCAFile = params["sslCAFile"].as<std::string>(); + } + + if (params.count("sslCRLFile")) { + cmdLine.sslCRLFile = params["sslCRLFile"].as<std::string>(); + } + if (params.count("sslWeakCertificateValidation")) { cmdLine.sslWeakCertificateValidation = true; } diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 938ac920e9c..b3f11d5b7dc 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -860,9 +860,9 @@ static void buildOptionsDescriptions(po::options_description *pVisible, #if defined(__linux__) ("shutdown", "kill a running server (for init scripts)") #endif - ("slowms",po::value<int>(&cmdLine.slowMS)->default_value(100), "value of slow for profile and console log" ) + ("slowms",po::value<int>()->default_value(100), "value of slow for profile and console log" ) ("smallfiles", "use a smaller default file size") - ("syncdelay",po::value<double>(&cmdLine.syncdelay)->default_value(60), "seconds between disk syncs (0=never, but not recommended)") + ("syncdelay",po::value<double>()->default_value(60), "seconds between disk syncs (0=never, but not recommended)") ("sysinfo", "print some diagnostic system information") ("upgrade", "upgrade db if needed") ; @@ -979,6 +979,13 @@ static void processCommandLineOptions(const std::vector<std::string>& argv) { dbpath = dbpath.erase(dbpath.size()-1); } #endif + if ( params.count("slowms")) { + cmdLine.slowMS = params["slowms"].as<int>(); + } + + if ( params.count("syncdelay")) { + cmdLine.syncdelay = params["syncdelay"].as<double>(); + } if ( params.count("directoryperdb")) { directoryperdb = true; |