You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/03/30 20:14:40 UTC
mesos git commit: Modified scheduler library to properly handle SSL
connections.
Repository: mesos
Updated Branches:
refs/heads/master d5d4f3c83 -> 0a4e1e467
Modified scheduler library to properly handle SSL connections.
This fixes the scheduler library to properly set the scheme
as \`https\` if SSL is enabled. If not, default to \`http\` as
is the case now. Would follow up with a similar change for the
executor library.
Review: https://reviews.apache.org/r/45435/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0a4e1e46
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0a4e1e46
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0a4e1e46
Branch: refs/heads/master
Commit: 0a4e1e467afd978b9bae61a2050d86c6e945b39b
Parents: d5d4f3c
Author: Anand Mazumdar <ma...@gmail.com>
Authored: Wed Mar 30 11:14:09 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Wed Mar 30 11:14:09 2016 -0700
----------------------------------------------------------------------
src/scheduler/scheduler.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0a4e1e46/src/scheduler/scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp
index 1397244..56476c3 100644
--- a/src/scheduler/scheduler.cpp
+++ b/src/scheduler/scheduler.cpp
@@ -428,8 +428,19 @@ protected:
const UPID& upid = future.get().get().pid();
latest = future.get();
+ string scheme = "http";
+
+#ifdef USE_SSL_SOCKET
+ Option<string> value;
+
+ value = os::getenv("SSL_ENABLED");
+ if (value.isSome() && (value.get() == "1" || value.get() == "true")) {
+ scheme = "https";
+ }
+#endif
+
master = ::URL(
- "http",
+ scheme,
upid.address.ip,
upid.address.port,
upid.id +