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/12/11 01:00:59 UTC

svn commit: r1419917 - /incubator/mesos/branches/0.10.x/src/slave/slave.hpp

Author: benh
Date: Tue Dec 11 00:00:59 2012
New Revision: 1419917

URL: http://svn.apache.org/viewvc?rev=1419917&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/branches/0.10.x/src/slave/slave.hpp

Modified: incubator/mesos/branches/0.10.x/src/slave/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.x/src/slave/slave.hpp?rev=1419917&r1=1419916&r2=1419917&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.x/src/slave/slave.hpp (original)
+++ incubator/mesos/branches/0.10.x/src/slave/slave.hpp Tue Dec 11 00:00:59 2012
@@ -328,7 +328,12 @@ 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"));