-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mongodb build on docker applying patch for ssl=no
- Loading branch information
1 parent
25e31a4
commit 6377c67
Showing
4 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
0001-Fix-SSL-off-build-OCSPManager-shouldn-t-be-used-when.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From 5101ec645038dd09edc8f4c295aacdf1c3827eeb Mon Sep 17 00:00:00 2001 | ||
From: Renan Castro <[email protected]> | ||
Date: Wed, 24 Mar 2021 15:53:12 -0300 | ||
Subject: [PATCH] Fix SSL off build, OCSPManager shouldn't be used when ssl = | ||
off | ||
|
||
--- | ||
src/mongo/db/db.cpp | 2 ++ | ||
src/mongo/s/server.cpp | 2 ++ | ||
src/mongo/shell/dbshell.cpp | 2 ++ | ||
3 files changed, 6 insertions(+) | ||
|
||
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp | ||
index 4804715116..a920e69c96 100644 | ||
--- a/src/mongo/db/db.cpp | ||
+++ b/src/mongo/db/db.cpp | ||
@@ -338,7 +338,9 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) { | ||
auto runner = makePeriodicRunner(serviceContext); | ||
serviceContext->setPeriodicRunner(std::move(runner)); | ||
|
||
+#ifdef MONGO_CONFIG_SSL | ||
OCSPManager::get()->startThreadPool(); | ||
+#endif | ||
|
||
if (!storageGlobalParams.repair) { | ||
auto tl = | ||
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp | ||
index e2f3550486..41d2327ad2 100644 | ||
--- a/src/mongo/s/server.cpp | ||
+++ b/src/mongo/s/server.cpp | ||
@@ -640,7 +640,9 @@ ExitCode runMongosServer(ServiceContext* serviceContext) { | ||
serviceContext->setPeriodicRunner(std::move(runner)); | ||
} | ||
|
||
+#ifdef MONGO_CONFIG_SSL | ||
OCSPManager::get()->startThreadPool(); | ||
+#endif | ||
|
||
serviceContext->setServiceEntryPoint(std::make_unique<ServiceEntryPointMongos>(serviceContext)); | ||
|
||
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp | ||
index 9fc8a96911..cdaff940c6 100644 | ||
--- a/src/mongo/shell/dbshell.cpp | ||
+++ b/src/mongo/shell/dbshell.cpp | ||
@@ -728,7 +728,9 @@ int _main(int argc, char* argv[], char** envp) { | ||
// TODO This should use a TransportLayerManager or TransportLayerFactory | ||
auto serviceContext = getGlobalServiceContext(); | ||
|
||
+#ifdef MONGO_CONFIG_SSL | ||
OCSPManager::get()->startThreadPool(); | ||
+#endif | ||
|
||
transport::TransportLayerASIO::Options opts; | ||
opts.enableIPv6 = shellGlobalParams.enableIPv6; | ||
-- | ||
2.30.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
FROM centos:7 | ||
|
||
RUN yum install -y epel-release centos-release-scl | ||
RUN yum install -y python3-devel python3-scons devtoolset-8-gcc devtoolset-8-gcc-c++ | ||
RUN yum install -y python3-devel python3-scons devtoolset-8-gcc devtoolset-8-gcc-c++ xz-compat-libs libcurl-devel | ||
RUN yum install -y xz-lzma-compat xz-devel | ||
|
||
|
||
ADD build.sh . | ||
ENTRYPOINT ["/build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters