SERVER-104912 Mark core.servers (#46270)
GitOrigin-RevId: e957309f612c2e4465336a1ea13afdd79e451b95
This commit is contained in:
parent
504566cdbf
commit
baa858b1d1
@ -100,6 +100,8 @@ core.service:
|
||||
|
||||
# stuff that is part of a *specific* mongo server (eg mongos, mongod)
|
||||
core.servers:
|
||||
meta:
|
||||
fully_marked: true
|
||||
files:
|
||||
- src/mongo/db/mongod.cpp
|
||||
- src/mongo/db/mongod_main.*
|
||||
|
||||
@ -38,7 +38,8 @@
|
||||
|
||||
namespace mongo {
|
||||
|
||||
class ClusterNetworkRestrictionManager {
|
||||
// TODO move to access_control module where the only impl is.
|
||||
class MONGO_MOD_UNFORTUNATELY_OPEN ClusterNetworkRestrictionManager {
|
||||
public:
|
||||
virtual ~ClusterNetworkRestrictionManager() = default;
|
||||
virtual void updateClusterNetworkRestrictions() = 0;
|
||||
@ -46,16 +47,17 @@ public:
|
||||
std::unique_ptr<ClusterNetworkRestrictionManager> manager);
|
||||
};
|
||||
|
||||
struct MongodGlobalParams {
|
||||
struct MONGO_MOD_NEEDS_REPLACEMENT MongodGlobalParams {
|
||||
bool scriptingEnabled = true; // Use "security.javascriptEnabled" to set this variable. Or use
|
||||
// --noscripting which will set it to false.
|
||||
|
||||
std::shared_ptr<std::vector<std::string>> allowlistedClusterNetwork;
|
||||
};
|
||||
|
||||
extern MongodGlobalParams mongodGlobalParams;
|
||||
MONGO_MOD_NEEDS_REPLACEMENT extern MongodGlobalParams mongodGlobalParams;
|
||||
|
||||
// TODO: move these to a replication module.
|
||||
void setGlobalReplSettings(const repl::ReplSettings& settings);
|
||||
const repl::ReplSettings& getGlobalReplSettings();
|
||||
MONGO_MOD_NEEDS_REPLACEMENT const repl::ReplSettings& getGlobalReplSettings();
|
||||
|
||||
} // namespace mongo
|
||||
|
||||
@ -95,21 +95,6 @@
|
||||
namespace mongo {
|
||||
|
||||
|
||||
std::string storageDBPathDescription() {
|
||||
StringBuilder sb;
|
||||
|
||||
sb << "Directory for datafiles - defaults to " << storageGlobalParams.kDefaultDbPath;
|
||||
|
||||
#ifdef _WIN32
|
||||
boost::filesystem::path currentPath = boost::filesystem::current_path();
|
||||
|
||||
sb << " which is " << currentPath.root_name().string() << storageGlobalParams.kDefaultDbPath
|
||||
<< " based on the current working drive";
|
||||
#endif
|
||||
|
||||
return sb.str();
|
||||
}
|
||||
|
||||
Status addMongodOptions(moe::OptionSection* options) try {
|
||||
uassertStatusOK(addGeneralServerOptions(options));
|
||||
uassertStatusOK(addNonGeneralServerOptions(options));
|
||||
|
||||
@ -30,15 +30,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "mongo/base/status.h"
|
||||
#include "mongo/db/auth/cluster_auth_mode.h"
|
||||
#include "mongo/db/server_options.h"
|
||||
#include "mongo/db/storage/storage_options.h"
|
||||
#include "mongo/util/exit_code.h"
|
||||
#include "mongo/util/modules.h"
|
||||
#include "mongo/util/options_parser/environment.h"
|
||||
#include "mongo/util/options_parser/option_section.h"
|
||||
#include "mongo/util/options_parser/value.h"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -82,9 +77,4 @@ Status canonicalizeMongodOptions(moe::Environment* params);
|
||||
|
||||
Status storeMongodOptions(const moe::Environment& params);
|
||||
|
||||
/**
|
||||
* Help test user for storage.dbPath config option.
|
||||
*/
|
||||
std::string storageDBPathDescription();
|
||||
|
||||
} // namespace mongo
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
global:
|
||||
cpp_namespace: "mongo"
|
||||
cpp_includes:
|
||||
- "mongo/db/mongod_options.h"
|
||||
- "mongo/db/storage/storage_options.h"
|
||||
configs:
|
||||
section: "Storage options"
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
#include "mongo/idl/server_parameter_test_controller.h"
|
||||
#include "mongo/unittest/temp_dir.h"
|
||||
#include "mongo/util/duration.h"
|
||||
#include "mongo/util/modules.h"
|
||||
#include "mongo/util/tick_source.h"
|
||||
#include "mongo/util/tick_source_mock.h"
|
||||
|
||||
@ -47,7 +48,8 @@
|
||||
|
||||
namespace mongo {
|
||||
|
||||
class MongoDScopedGlobalServiceContextForTest : public ScopedGlobalServiceContextForTest {
|
||||
class MONGO_MOD_OPEN MongoDScopedGlobalServiceContextForTest
|
||||
: public ScopedGlobalServiceContextForTest {
|
||||
public:
|
||||
constexpr static StorageEngineInitFlags kDefaultStorageEngineInitFlags =
|
||||
StorageEngineInitFlags::kSkipMetadataFile;
|
||||
@ -195,7 +197,7 @@ private:
|
||||
unittest::TempDir _tempDir{"service_context_d_test_fixture"};
|
||||
};
|
||||
|
||||
class ServiceContextMongoDTest : public ServiceContextTest {
|
||||
class MONGO_MOD_OPEN ServiceContextMongoDTest : public ServiceContextTest {
|
||||
public:
|
||||
using Options = MongoDScopedGlobalServiceContextForTest::Options;
|
||||
|
||||
|
||||
@ -40,6 +40,10 @@
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#endif
|
||||
namespace mongo {
|
||||
|
||||
StorageGlobalParams::StorageGlobalParams() {
|
||||
@ -101,4 +105,19 @@ const char* StorageGlobalParams::kDefaultDbPath = "/data/db";
|
||||
const char* StorageGlobalParams::kDefaultConfigDbPath = "/data/configdb";
|
||||
#endif
|
||||
|
||||
std::string storageDBPathDescription() {
|
||||
StringBuilder sb;
|
||||
|
||||
sb << "Directory for datafiles - defaults to " << storageGlobalParams.kDefaultDbPath;
|
||||
|
||||
#ifdef _WIN32
|
||||
boost::filesystem::path currentPath = boost::filesystem::current_path();
|
||||
|
||||
sb << " which is " << currentPath.root_name().string() << storageGlobalParams.kDefaultDbPath
|
||||
<< " based on the current working drive";
|
||||
#endif
|
||||
|
||||
return sb.str();
|
||||
}
|
||||
|
||||
} // namespace mongo
|
||||
|
||||
@ -148,6 +148,11 @@ private:
|
||||
void _reset();
|
||||
};
|
||||
|
||||
/**
|
||||
* Help test user for storage.dbPath config option.
|
||||
*/
|
||||
std::string storageDBPathDescription();
|
||||
|
||||
extern StorageGlobalParams storageGlobalParams;
|
||||
|
||||
} // namespace MONGO_MOD_PUBLIC mongo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user