summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_main.cpp
diff options
context:
space:
mode:
authorVarun Ravichandran <varun.ravichandran@mongodb.com>2022-05-19 18:11:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-27 16:05:22 +0000
commit834c86a44cef817ba8dce4aa24931b69c69aac50 (patch)
treeaae321d349201a284fd123ea5ab9e4a062e87c59 /src/mongo/db/mongod_main.cpp
parente74b25e957c8e4f46aa721151aa72007537b4cde (diff)
downloadmongo-834c86a44cef817ba8dce4aa24931b69c69aac50.tar.gz
SERVER-65728: Audit cluster server parameters on startup, update, and retrieval
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r--src/mongo/db/mongod_main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index be1bd6fc294..8242c351a6a 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -382,7 +382,6 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) {
#endif
logProcessDetails(nullptr);
- audit::logStartupOptions(Client::getCurrent(), serverGlobalParams.parsedOpts);
serviceContext->setServiceEntryPoint(std::make_unique<ServiceEntryPointMongod>(serviceContext));
@@ -832,6 +831,10 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) {
}
}
+ // Startup options are written to the audit log at the end of startup so that cluster server
+ // parameters are guaranteed to have been initialized from disk at this point.
+ audit::logStartupOptions(Client::getCurrent(), serverGlobalParams.parsedOpts);
+
serviceContext->notifyStartupComplete();
#ifndef _WIN32