summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/db.cpp3
-rw-r--r--src/mongo/db/startup_warnings_common.cpp18
-rw-r--r--src/mongo/db/startup_warnings_common.h5
-rw-r--r--src/mongo/db/startup_warnings_mongod.cpp10
-rw-r--r--src/mongo/db/startup_warnings_mongod.h4
-rw-r--r--src/mongo/s/server.cpp3
6 files changed, 9 insertions, 34 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 14e8c5b4267..a77d99b1657 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -82,7 +82,6 @@
#include "mongo/db/repl/replication_coordinator_impl.h"
#include "mongo/db/repl/topology_coordinator_impl.h"
#include "mongo/db/restapi.h"
-#include "mongo/db/server_options.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/startup_warnings_mongod.h"
#include "mongo/db/stats/counters.h"
@@ -532,7 +531,7 @@ static void _initAndListen(int listenPort) {
getGlobalEnvironment()->setGlobalStorageEngine(storageGlobalParams.engine);
- logMongodStartupWarnings(storageGlobalParams, serverGlobalParams);
+ logMongodStartupWarnings(storageGlobalParams);
{
stringstream ss;
diff --git a/src/mongo/db/startup_warnings_common.cpp b/src/mongo/db/startup_warnings_common.cpp
index b8c64d4e507..2e2fe6ed0e6 100644
--- a/src/mongo/db/startup_warnings_common.cpp
+++ b/src/mongo/db/startup_warnings_common.cpp
@@ -35,8 +35,6 @@
#include <boost/filesystem/operations.hpp>
#include <fstream>
-#include "mongo/db/auth/authorization_manager_global.h"
-#include "mongo/db/server_options.h"
#include "mongo/util/log.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/version.h"
@@ -46,7 +44,7 @@ namespace mongo {
//
// system warnings
//
-void logCommonStartupWarnings(const ServerGlobalParams& serverParams) {
+void logCommonStartupWarnings() {
// each message adds a leading and a trailing newline
bool warned = false;
@@ -62,20 +60,6 @@ void logCommonStartupWarnings(const ServerGlobalParams& serverParams) {
}
}
- if ((getGlobalAuthorizationManager()->isAuthEnabled() ||
- serverParams.clusterAuthMode.load() != ServerGlobalParams::ClusterAuthMode_undefined) &&
- (serverParams.rest || serverParams.isHttpInterfaceEnabled || serverParams.jsonp)) {
- log() << startupWarningsLog;
- log()
- << "** WARNING: The server is started with the web server interface and access control."
- << startupWarningsLog;
- log() << "** The web interfaces (rest, httpinterface and/or jsonp) are insecure "
- << startupWarningsLog;
- log() << "** and should be disabled unless required for backward compatability."
- << startupWarningsLog;
- warned = true;
- }
-
#if defined(_WIN32) && !defined(_WIN64)
// Warn user that they are running a 32-bit app on 64-bit Windows
BOOL wow64Process;
diff --git a/src/mongo/db/startup_warnings_common.h b/src/mongo/db/startup_warnings_common.h
index 33f75cab56b..ac77a2d5ce3 100644
--- a/src/mongo/db/startup_warnings_common.h
+++ b/src/mongo/db/startup_warnings_common.h
@@ -27,10 +27,7 @@
*/
namespace mongo {
-
-struct ServerGlobalParams;
-
// Checks various startup conditions and logs any necessary warnings that
// are common to both mongod and mongos processes.
-void logCommonStartupWarnings(const ServerGlobalParams& serverParams);
+void logCommonStartupWarnings();
} // namespace mongo
diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp
index b85b0af6ead..4d73540482c 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -38,7 +38,6 @@
#include <sys/resource.h>
#endif
-#include "mongo/db/server_options.h"
#include "mongo/db/startup_warnings_common.h"
#include "mongo/db/storage_options.h"
#include "mongo/util/mongoutils/str.h"
@@ -131,9 +130,8 @@ StatusWith<std::string> StartupWarningsMongod::readTransparentHugePagesParameter
return StatusWith<std::string>(opMode);
}
-void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
- const ServerGlobalParams& serverParams) {
- logCommonStartupWarnings(serverParams);
+void logMongodStartupWarnings(const StorageGlobalParams& params) {
+ logCommonStartupWarnings();
bool warned = false;
@@ -142,7 +140,7 @@ void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
log() << "** NOTE: This is a 32 bit MongoDB binary." << startupWarningsLog;
log() << "** 32 bit builds are limited to less than 2GB of data "
<< "(or less with --journal)." << startupWarningsLog;
- if (!storageParams.dur) {
+ if (!params.dur) {
log() << "** Note that journaling defaults to off for 32 bit "
<< "and is currently off." << startupWarningsLog;
}
@@ -221,7 +219,7 @@ void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
}
}
- if (storageParams.dur) {
+ if (params.dur) {
std::fstream f("/proc/sys/vm/overcommit_memory", ios_base::in);
unsigned val;
f >> val;
diff --git a/src/mongo/db/startup_warnings_mongod.h b/src/mongo/db/startup_warnings_mongod.h
index b6f4048237d..b1dbbd21b5c 100644
--- a/src/mongo/db/startup_warnings_mongod.h
+++ b/src/mongo/db/startup_warnings_mongod.h
@@ -32,7 +32,6 @@
namespace mongo {
struct StorageGlobalParams;
-struct ServerGlobalParams;
class StartupWarningsMongod {
private:
@@ -55,6 +54,5 @@ public:
// Checks various startup conditions and logs any necessary warnings that
// are specific to the mongod process.
-void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
- const ServerGlobalParams& serverParams);
+void logMongodStartupWarnings(const StorageGlobalParams& params);
} // namespace mongo
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index e7102c94fa6..3a4af2b6491 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -57,7 +57,6 @@
#include "mongo/db/lasterror.h"
#include "mongo/db/log_process_details.h"
#include "mongo/db/operation_context_noop.h"
-#include "mongo/db/server_options.h"
#include "mongo/db/startup_warnings_common.h"
#include "mongo/platform/process_id.h"
#include "mongo/s/balance.h"
@@ -432,7 +431,7 @@ int mongoSMain(int argc, char* argv[], char** envp) {
startupConfigActions(std::vector<std::string>(argv, argv + argc));
cmdline_utils::censorArgvArray(argc, argv);
- mongo::logCommonStartupWarnings(serverGlobalParams);
+ mongo::logCommonStartupWarnings();
try {
int exitCode = _main();