Repository: mesos
Updated Branches:
  refs/heads/master 757b6ea3e -> a377eda84


Fixed compile error comparing resources.


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

Branch: refs/heads/master
Commit: a377eda8486e43c91274885ef19934cd89820632
Parents: 757b6ea
Author: Benjamin Hindman <[email protected]>
Authored: Fri Apr 17 15:14:12 2015 -0700
Committer: Benjamin Hindman <[email protected]>
Committed: Fri Apr 17 15:14:12 2015 -0700

----------------------------------------------------------------------
 src/slave/containerizer/docker.hpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a377eda8/src/slave/containerizer/docker.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.hpp 
b/src/slave/containerizer/docker.hpp
index 1c81717..0d5289c 100644
--- a/src/slave/containerizer/docker.hpp
+++ b/src/slave/containerizer/docker.hpp
@@ -296,14 +296,14 @@ private:
       // originally. See Framework::launchExecutor in slave.cpp. We
       // check that this is indeed the case here to protect ourselves
       // from when/if this changes in the future (but it's not a
-      // perfect check because an executor might always have more
-      // resources than a task, nevertheless, it's better than
-      // nothing).
+      // perfect check because an executor might always have a subset
+      // of it's resources that match a task, nevertheless, it's
+      // better than nothing).
+      resources = executor.resources();
+
       if (task.isSome()) {
-        CHECK(executor.resources() >= task.get().resources());
+        CHECK(resources.contains(task.get().resources()));
       }
-
-      resources = executor.resources();
     }
 
     ~Container()

Reply via email to