You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2014/10/24 00:01:11 UTC

git commit: Added module loading support for local clusters.

Repository: mesos
Updated Branches:
  refs/heads/master 3c01efd9a -> 8bf7e726e


Added module loading support for local clusters.

Frameworks triggering a local cluster (--master=local) now have module loading
support via slave and master flags (--modules).

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


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

Branch: refs/heads/master
Commit: 8bf7e726e59785805f88c67ad1b629bb3dae83d4
Parents: 3c01efd
Author: Till Toenshoff <to...@me.com>
Authored: Fri Oct 24 00:00:04 2014 +0200
Committer: Till Toenshoff <to...@me.com>
Committed: Fri Oct 24 00:00:04 2014 +0200

----------------------------------------------------------------------
 src/local/local.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/8bf7e726/src/local/local.cpp
----------------------------------------------------------------------
diff --git a/src/local/local.cpp b/src/local/local.cpp
index 2756d42..89fed0b 100644
--- a/src/local/local.cpp
+++ b/src/local/local.cpp
@@ -49,6 +49,8 @@
 #include "master/registrar.hpp"
 #include "master/repairer.hpp"
 
+#include "module/manager.hpp"
+
 #include "slave/containerizer/containerizer.hpp"
 #include "slave/gc.hpp"
 #include "slave/slave.hpp"
@@ -135,6 +137,15 @@ PID<Master> launch(const Flags& flags, Allocator* _allocator)
               << "master flags from the environment: " << load.error();
     }
 
+    // Load modules. Note that this covers both, master and slave
+    // specific modules as both use the same flag (--modules).
+    if (flags.modules.isSome()) {
+      Try<Nothing> result = modules::ModuleManager::load(flags.modules.get());
+      if (result.isError()) {
+        EXIT(1) << "Error loading modules: " << result.error();
+      }
+    }
+
     if (flags.registry == "in_memory") {
       if (flags.registry_strict) {
         EXIT(1) << "Cannot use '--registry_strict' when using in-memory storage"