aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wick...@apache.org
Subject git commit: add support for Mesos masters running with --no-root_submissions, see AURORA-311
Date Thu, 21 Aug 2014 18:02:39 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master f560cad38 -> c545e656b


add support for Mesos masters running with --no-root_submissions, see AURORA-311

Review board entry for https://issues.apache.org/jira/browse/AURORA-311

Testing Done:
Tested successfully on internal cluster with version 0.5.1. Aurora was able
to connect to a mesos master that was running with --no-root_submissions and
was able to schedule tasks with a role of EXECUTOR_USER that then were
running as the specified executor user.

Bugs closed: AURORA-311

Reviewed at https://reviews.apache.org/r/23471/


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

Branch: refs/heads/master
Commit: c545e656b4750976bb49d8a46a089f6227b2ea95
Parents: f560cad
Author: Bjoern Metzdorf <bmetzdorf@apple.com>
Authored: Thu Aug 21 13:02:34 2014 -0500
Committer: Brian Wickman <wickman@apache.org>
Committed: Thu Aug 21 13:02:34 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/aurora/scheduler/DriverFactory.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c545e656/src/main/java/org/apache/aurora/scheduler/DriverFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/DriverFactory.java b/src/main/java/org/apache/aurora/scheduler/DriverFactory.java
index a65e1bb..f300ec9 100644
--- a/src/main/java/org/apache/aurora/scheduler/DriverFactory.java
+++ b/src/main/java/org/apache/aurora/scheduler/DriverFactory.java
@@ -100,7 +100,13 @@ public interface DriverFactory extends Function<String, SchedulerDriver>
{
             + "DriverFactory.java for more information.")
     private static final Arg<Boolean> REQUIRE_SLAVE_CHECKPOINT = Arg.create(false);
 
-    private static final String EXECUTOR_USER = "root";
+    @CmdLine(name = "executor_user",
+        help = "User to start the executor. Defaults to \"root\". "
+            + "Set this to an unprivileged user if the mesos master was started with \"--no-root_submissions\".
"
+            + "If set to anything other than \"root\", the executor will ignore the \"role\"
setting for jobs "
+            + "since it can't use setuid() anymore. This means that all your jobs will run
under "
+            + "the specified user and the user has to exist on the mesos slaves.")
+    private static final Arg<String> EXECUTOR_USER = Arg.create("root");
 
     private static final String TWITTER_FRAMEWORK_NAME = "TwitterScheduler";
 
@@ -132,7 +138,7 @@ public interface DriverFactory extends Function<String, SchedulerDriver>
{
       LOG.info("Connecting to mesos master: " + MESOS_MASTER_ADDRESS.get());
 
       FrameworkInfo.Builder frameworkInfo = FrameworkInfo.newBuilder()
-          .setUser(EXECUTOR_USER)
+          .setUser(EXECUTOR_USER.get())
           .setName(TWITTER_FRAMEWORK_NAME)
           .setCheckpoint(REQUIRE_SLAVE_CHECKPOINT.get())
           .setFailoverTimeout(FRAMEWORK_FAILOVER_TIMEOUT.get().as(Time.SECONDS));


Mime
View raw message