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/01/27 00:22:37 UTC

[2/6] mesos git commit: Added environment variables to be used by HTTP executors.

Added environment variables to be used by HTTP executors.

This change adds some environment variables that are used by the HTTP
executors upon startup for connecting/retrying to the agent. These
variables are discussed in more detail in the Executor HTTP API Design
Doc.

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


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

Branch: refs/heads/master
Commit: b338845c2b7cd744169a86fe684a32394ba7f2db
Parents: 6826582
Author: Anand Mazumdar <ma...@gmail.com>
Authored: Tue Jan 26 15:20:29 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Jan 26 15:20:29 2016 -0800

----------------------------------------------------------------------
 src/slave/containerizer/containerizer.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b338845c/src/slave/containerizer/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/containerizer.cpp b/src/slave/containerizer/containerizer.cpp
index fa6e279..5990468 100644
--- a/src/slave/containerizer/containerizer.cpp
+++ b/src/slave/containerizer/containerizer.cpp
@@ -327,10 +327,16 @@ map<string, string> executorEnvironment(
   environment["MESOS_DIRECTORY"] = directory;
   environment["MESOS_SLAVE_ID"] = slaveId.value();
   environment["MESOS_SLAVE_PID"] = stringify(slavePid);
+  environment["MESOS_AGENT_ENDPOINT"] = stringify(slavePid.address);
   environment["MESOS_CHECKPOINT"] = checkpoint ? "1" : "0";
 
   if (checkpoint) {
     environment["MESOS_RECOVERY_TIMEOUT"] = stringify(flags.recovery_timeout);
+
+    // The maximum backoff duration to be used by an executor between two
+    // retries when disconnected.
+    environment["MESOS_SUBSCRIPTION_BACKOFF_MAX"] =
+      stringify(EXECUTOR_REREGISTER_TIMEOUT);
   }
 
   if (HookManager::hooksAvailable()) {