You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/10/04 01:37:49 UTC

svn commit: r1393829 - /incubator/mesos/trunk/src/slave/slave.hpp

Author: benh
Date: Wed Oct  3 23:37:49 2012
New Revision: 1393829

URL: http://svn.apache.org/viewvc?rev=1393829&view=rev
Log:
Fixes a bug where tasks that don't have an executor were not getting
their URIs or environment properly set up.

Modified:
    incubator/mesos/trunk/src/slave/slave.hpp

Modified: incubator/mesos/trunk/src/slave/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.hpp?rev=1393829&r1=1393828&r2=1393829&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.hpp (original)
+++ incubator/mesos/trunk/src/slave/slave.hpp Wed Oct  3 23:37:49 2012
@@ -338,9 +338,14 @@ struct Framework
 
       executor.mutable_executor_id()->set_value(id);
 
-      // Now determine the path to the executor.
+      // Copy the CommandInfo to get the URIs and environment, but
+      // update it to invoke 'mesos-executor' (unless we couldn't
+      // resolve 'mesos-executor' via 'realpath', in which case just
+      // echo the error and exit).
+      executor.mutable_command()->MergeFrom(task.command());
+
       Try<std::string> path = os::realpath(
-          ::path::join(flags.launcher_dir, "mesos-executor"));
+          path::join(flags.launcher_dir, "mesos-executor"));
 
       if (path.isSome()) {
         executor.mutable_command()->set_value(path.get());