You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/07/15 22:07:03 UTC

[1/2] mesos git commit: Made the scheduler authentication timeout configurable.

Repository: mesos
Updated Branches:
  refs/heads/master 8f829f174 -> d6dd82e14


Made the scheduler authentication timeout configurable.

Review: https://reviews.apache.org/r/50026/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e13a1c03
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e13a1c03
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e13a1c03

Branch: refs/heads/master
Commit: e13a1c039e78fb281dd2862e46bb5059bf613540
Parents: 8f829f1
Author: haosdent huang <ha...@gmail.com>
Authored: Fri Jul 15 15:05:04 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri Jul 15 15:05:04 2016 -0700

----------------------------------------------------------------------
 src/sched/constants.hpp | 3 +++
 src/sched/flags.hpp     | 6 ++++++
 src/sched/sched.cpp     | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e13a1c03/src/sched/constants.hpp
----------------------------------------------------------------------
diff --git a/src/sched/constants.hpp b/src/sched/constants.hpp
index 75973c9..9edb25b 100644
--- a/src/sched/constants.hpp
+++ b/src/sched/constants.hpp
@@ -49,6 +49,9 @@ constexpr Duration DEFAULT_AUTHENTICATION_BACKOFF_FACTOR = Seconds(1);
 // Name of the default, CRAM-MD5 authenticatee.
 constexpr char DEFAULT_AUTHENTICATEE[] = "crammd5";
 
+// Default value for `--authentication_timeout`.
+constexpr Duration DEFAULT_AUTHENTICATION_TIMEOUT = Seconds(5);
+
 } // namespace scheduler {
 } // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e13a1c03/src/sched/flags.hpp
----------------------------------------------------------------------
diff --git a/src/sched/flags.hpp b/src/sched/flags.hpp
index 43b38d7..8782c7b 100644
--- a/src/sched/flags.hpp
+++ b/src/sched/flags.hpp
@@ -118,6 +118,11 @@ public:
         "master. Use the default '" + std::string(DEFAULT_AUTHENTICATEE) + "'\n"
         "or load an alternate authenticatee module using MESOS_MODULES.",
         DEFAULT_AUTHENTICATEE);
+
+    add(&Flags::authentication_timeout,
+        "authentication_timeout",
+        "Timeout after which authentication will be retried.",
+        DEFAULT_AUTHENTICATION_TIMEOUT);
   }
 
   Duration authentication_backoff_factor;
@@ -125,6 +130,7 @@ public:
   Option<Modules> modules;
   Option<std::string> modulesDir;
   std::string authenticatee;
+  Duration authentication_timeout;
 };
 
 } // namespace scheduler {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e13a1c03/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index b9315b5..54f3ea2 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -431,7 +431,7 @@ protected:
       authenticatee->authenticate(master.get().pid(), self(), credential.get())
         .onAny(defer(self(), &Self::_authenticate));
 
-    delay(Seconds(5),
+    delay(flags.authentication_timeout,
           self(),
           &Self::authenticationTimeout,
           authenticating.get());


[2/2] mesos git commit: Sped up the `ExamplesTest.*` test cases.

Posted by bm...@apache.org.
Sped up the `ExamplesTest.*` test cases.

This lowers the scheduler authentication timeout to speed up the
`ExamplesTest.*` test cases. Because the master may drop the
authentication message from the scheduler while it is recovering,
lowering the authentication timeout could speed up the scheduler
retries to connect the master.

Review: https://reviews.apache.org/r/42441/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d6dd82e1
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d6dd82e1
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d6dd82e1

Branch: refs/heads/master
Commit: d6dd82e14c117f076b6de1671dd2185c04846a00
Parents: e13a1c0
Author: haosdent huang <ha...@gmail.com>
Authored: Fri Jul 15 15:06:19 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri Jul 15 15:06:19 2016 -0700

----------------------------------------------------------------------
 src/tests/dynamic_reservation_framework_test.sh | 4 ++++
 src/tests/java_exception_test.sh                | 4 ++++
 src/tests/java_framework_test.sh                | 4 ++++
 src/tests/no_executor_framework_test.sh         | 4 ++++
 src/tests/persistent_volume_framework_test.sh   | 4 ++++
 src/tests/python_framework_test.sh              | 4 ++++
 src/tests/test_framework_test.sh                | 4 ++++
 src/tests/test_http_framework_test.sh           | 4 ++++
 8 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/dynamic_reservation_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/dynamic_reservation_framework_test.sh b/src/tests/dynamic_reservation_framework_test.sh
index 448dfee..5e664c8 100755
--- a/src/tests/dynamic_reservation_framework_test.sh
+++ b/src/tests/dynamic_reservation_framework_test.sh
@@ -24,6 +24,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/java_exception_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/java_exception_test.sh b/src/tests/java_exception_test.sh
index fd02322..fdafc45 100755
--- a/src/tests/java_exception_test.sh
+++ b/src/tests/java_exception_test.sh
@@ -21,6 +21,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Check that the JavaException framework crashes and prints an
 # ArrayIndexOutOfBoundsExcpetion. This is a test to be sure that Java
 # exceptions are getting propagated. Th exit status of grep should be 0.

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/java_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/java_framework_test.sh b/src/tests/java_framework_test.sh
index 8fccc69..b2d7481 100755
--- a/src/tests/java_framework_test.sh
+++ b/src/tests/java_framework_test.sh
@@ -21,6 +21,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves.
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/no_executor_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/no_executor_framework_test.sh b/src/tests/no_executor_framework_test.sh
index 4fa154e..29c952d 100755
--- a/src/tests/no_executor_framework_test.sh
+++ b/src/tests/no_executor_framework_test.sh
@@ -24,6 +24,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/persistent_volume_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/persistent_volume_framework_test.sh b/src/tests/persistent_volume_framework_test.sh
index 074cdcb..6a80719 100755
--- a/src/tests/persistent_volume_framework_test.sh
+++ b/src/tests/persistent_volume_framework_test.sh
@@ -25,6 +25,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/python_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/python_framework_test.sh b/src/tests/python_framework_test.sh
index dc3a50f..74427b4 100755
--- a/src/tests/python_framework_test.sh
+++ b/src/tests/python_framework_test.sh
@@ -21,6 +21,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/test_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/test_framework_test.sh b/src/tests/test_framework_test.sh
index 617ca52..73b4ddc 100755
--- a/src/tests/test_framework_test.sh
+++ b/src/tests/test_framework_test.sh
@@ -25,6 +25,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d6dd82e1/src/tests/test_http_framework_test.sh
----------------------------------------------------------------------
diff --git a/src/tests/test_http_framework_test.sh b/src/tests/test_http_framework_test.sh
index 0e04ff6..b724203 100755
--- a/src/tests/test_http_framework_test.sh
+++ b/src/tests/test_http_framework_test.sh
@@ -24,6 +24,10 @@ MESOS_WORK_DIR=`mktemp -d -t mesos-XXXXXX`
 atexit "rm -rf ${MESOS_WORK_DIR}"
 export MESOS_WORK_DIR=${MESOS_WORK_DIR}
 
+# Lower the authentication timeout to speed up the test (the master
+# may drop the authentication message while it is recovering).
+export MESOS_AUTHENTICATION_TIMEOUT=200ms
+
 # Set local Mesos runner to use 3 slaves
 export MESOS_NUM_SLAVES=3