You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/07/07 19:40:13 UTC

[1/2] mesos git commit: Searched executables from the current working directory.

Repository: mesos
Updated Branches:
  refs/heads/1.3.x ab35c7a7d -> 716b81a02


Searched executables from the current working directory.

If a framework specifies use of its own executor (in the sandbox) and
sets shell to false, the executor is never found. This is becase if
the PATH env variable is set, `execvp` or `execvpe` won't look into
the current working directory for executables. This patch adds the
support for searching the current working directory for executables.

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


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

Branch: refs/heads/1.3.x
Commit: 5fd5814b69c0c59ce84dd658f4c905f1692ccf8a
Parents: ab35c7a
Author: Aaron Wood <aa...@verizon.com>
Authored: Fri Jul 7 11:53:55 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Jul 7 12:34:59 2017 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/launch.cpp | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5fd5814b/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index 2835bef..d5da7af 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -768,13 +768,31 @@ int MesosContainerizerLaunch::execute()
   }
 #endif // __WINDOWS__
 
+#ifndef __WINDOWS__
+  // Search executable in the current working directory as well.
+  // execvpe and execvp will only search executable from the current
+  // working directory if environment variable PATH is not set.
+  // TODO(aaron.wood): 'os::which' current does not work on Windows.
+  // Remove the ifndef guard once it's supported on Windows.
+  if (!path::absolute(executable) &&
+      launchInfo.has_working_directory()) {
+    Option<string> which = os::which(
+        executable,
+        launchInfo.working_directory());
+
+    if (which.isSome()) {
+      executable = which.get();
+    }
+  }
+#endif // __WINDOWS__
+
   if (envp.isSome()) {
     os::execvpe(executable.c_str(), argv, envp.get());
   } else {
     os::execvp(executable.c_str(), argv);
   }
 
-  // If we get here, the execle call failed.
+  // If we get here, the execvp call failed.
   cerr << "Failed to execute command: " << os::strerror(errno) << endl;
   exitWithStatus(EXIT_FAILURE);
   UNREACHABLE();


[2/2] mesos git commit: Added MESOS-7703 to 1.3.1 CHANGELOG.

Posted by ji...@apache.org.
Added MESOS-7703 to 1.3.1 CHANGELOG.


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

Branch: refs/heads/1.3.x
Commit: 716b81a021445c8a31bebc827f4f6b5e4133a4b6
Parents: 5fd5814
Author: Jie Yu <yu...@gmail.com>
Authored: Fri Jul 7 12:38:18 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Jul 7 12:40:05 2017 -0700

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/716b81a0/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index c33dd99..fb14041 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,7 @@ All Issues:
   * [MESOS-7689] - Libprocess can crash on malformed request paths for libprocess messages.
   * [MESOS-7690] - The agent can crash when an unknown executor tries to register.
   * [MESOS-7692] - Default environment variables defined in Docker image are not available in Mesos containerizer.
+  * [MESOS-7703] - Mesos fails to exec a custom executor when no shell is used.
 
 
 Release Notes - Mesos - Version 1.3.0